mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
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:
parent
8cfe21f6aa
commit
6582e2ff06
@ -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;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user