Skip to content

Commit

Permalink
fix client side detection
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickkunka committed Aug 27, 2018
1 parent c8e0372 commit 5288cd1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.txt
@@ -1,3 +1,7 @@
# v0.1.3

- Fixes issue where library erroneously detected client-side environment when running on Node.js.

# v0.1.0

- 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.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "helpful-merge",
"version": "0.1.2",
"version": "0.1.3",
"description": "A highly-configurable merge implementation with intelligent error handling for validating consumer-provided input against configuration interfaces.",
"author": "KunkaLabs Limited",
"private": false,
Expand Down
2 changes: 1 addition & 1 deletion src/merge.ts
Expand Up @@ -7,7 +7,7 @@ import IMerge from './Interfaces/IMerge';
import * as Messages from './Messages';

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

let sourceKeys: string[] = [];
let config: Config;
Expand Down

0 comments on commit 5288cd1

Please sign in to comment.