Skip to content

Commit 5288cd1

Browse files
committed
fix client side detection
1 parent c8e0372 commit 5288cd1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# v0.1.3
2+
3+
- Fixes issue where library erroneously detected client-side environment when running on Node.js.
4+
15
# v0.1.0
26

37
- Will not attempt to deep-merge DOM nodes if provided as part of a nested source object. This previously resulted in an infinite loop due to circular references.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "helpful-merge",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "A highly-configurable merge implementation with intelligent error handling for validating consumer-provided input against configuration interfaces.",
55
"author": "KunkaLabs Limited",
66
"private": false,

src/merge.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import IMerge from './Interfaces/IMerge';
77
import * as Messages from './Messages';
88

99
function merge<T extends any>(target: T, source: any, options: (IConfig|true) = null): T {
10-
const isClientSide = typeof window !== undefined;
10+
const isClientSide = typeof window !== 'undefined';
1111

1212
let sourceKeys: string[] = [];
1313
let config: Config;

0 commit comments

Comments
 (0)