From b0158884904e8a9837a97b5801867ba2892c2b36 Mon Sep 17 00:00:00 2001 From: Kiko Beats Date: Wed, 9 Dec 2015 19:55:34 +0100 Subject: [PATCH] Compare with null instead of strict with undefined --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index b7c605e..55738c1 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ return function deepmerge(target, src) { target = target || []; dst = dst.concat(target); src.forEach(function(e, i) { - if (typeof dst[i] === 'undefined') { + if (typeof dst[i] == null) { dst[i] = e; } else if (typeof e === 'object') { dst[i] = deepmerge(target[i], e);