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,7 +108,11 @@
var objClone = {};
each(obj, function(value, key) {
if (obj.hasOwnProperty(key)) {
objClone[key] = value;
if (typeof value === 'object' && value !== null) {
objClone[key] = clone(value);
} else {
objClone[key] = value;
}
}
});
return objClone;