Skip to content

Commit

Permalink
Fix copyObject() to deep copy nested arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
kimrutherford committed Mar 14, 2024
1 parent b2c2148 commit 494c7f1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions root/static/js/canto-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@ function copyObject(src, dest, keysFilter) {
}

if (src[key] instanceof Array) {
dest[key] = [];
var len = src[key].length;
var i;
for (i = 0; i < len; i++) {
dest[key][i] = src[key][i];
}
dest[key] = $.extend(true, [], src[key]);
return;
}

Expand Down

0 comments on commit 494c7f1

Please sign in to comment.