From: Beda Kosata Date: Thu, 26 Apr 2012 12:22:52 +0000 (+0200) Subject: null should be converted into {} in deepcopy - fixes turning on/off highlightSeriesOpts X-Git-Tag: v1.0.0~273^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=c1c5dfebe6ce7c4383cfd574c2d555463dd114e7;p=dygraphs.git null should be converted into {} in deepcopy - fixes turning on/off highlightSeriesOpts --- diff --git a/dygraph-utils.js b/dygraph-utils.js index f5440c7..63411a5 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -598,7 +598,7 @@ Dygraph.updateDeep = function (self, o) { // DOM objects are shallowly-copied. self[k] = o[k]; } else if (typeof(o[k]) == 'object') { - if (typeof(self[k]) != 'object') { + if (typeof(self[k]) != 'object' || self[k] === null) { self[k] = {}; } Dygraph.updateDeep(self[k], o[k]);