Handle nesting better in the clone method so that we don't wipe out the line defaults when the scatter chart extends

This commit is contained in:
Evert Timberg 2015-06-13 08:59:54 -04:00
parent 8cfe21f6aa
commit 6582e2ff06

View File

@ -108,8 +108,12 @@
var objClone = {}; var objClone = {};
each(obj, function(value, key) { each(obj, function(value, key) {
if (obj.hasOwnProperty(key)) { if (obj.hasOwnProperty(key)) {
if (typeof value === 'object' && value !== null) {
objClone[key] = clone(value);
} else {
objClone[key] = value; objClone[key] = value;
} }
}
}); });
return objClone; return objClone;
}, },