From 97a2232fbfe9ced143167f59f8cf7ae679270a30 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Tue, 9 Jun 2015 18:43:33 -0400 Subject: [PATCH] Forgot that `typeof null === 'object'` Added a check for this condition so that merge works correctly --- src/Chart.Core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 8034efabf..fac8424b8 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -206,7 +206,7 @@ baseArray.push(valueObj); // nothing to merge } }); - } else if (base.hasOwnProperty(key) && typeof base[key] == "object" && typeof value == "object") { + } else if (base.hasOwnProperty(key) && typeof base[key] == "object" && base[key] !== null && typeof value == "object") { // If we are overwriting an object with an object, do a merge of the properties. base[key] = helpers.configMerge(base[key], value); } else { -- 2.47.3