From: Evert Timberg Date: Tue, 9 Jun 2015 22:43:33 +0000 (-0400) Subject: Forgot that `typeof null === 'object'` X-Git-Tag: 2.0.0-alpha2~27^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F1187%2Fhead;p=thirdparty%2FChart.js.git Forgot that `typeof null === 'object'` Added a check for this condition so that merge works correctly --- 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 {