mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-09 17:56:51 +01:00
Clone handles arrays better
This commit is contained in:
@@ -108,7 +108,9 @@
|
||||
var objClone = {};
|
||||
each(obj, function(value, key) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (helpers.isArray(value)) {
|
||||
objClone[key] = value.slice(0);
|
||||
} else if (typeof value === 'object' && value !== null) {
|
||||
objClone[key] = clone(value);
|
||||
} else {
|
||||
objClone[key] = value;
|
||||
|
||||
Reference in New Issue
Block a user