fix: ensure $state.snapshot clones holey arrays correctly

pull/14657/head
Dominic Gannaway 2 years ago
parent edf468a912
commit 0eb8aae723

@ -70,7 +70,7 @@ function clone(value, cloned, path, paths, original = null) {
for (var i = 0; i < value.length; i += 1) { for (var i = 0; i < value.length; i += 1) {
var element = value[i]; var element = value[i];
if (element !== undefined) { if (i in element) {
copy[i] = clone(element, cloned, DEV ? `${path}[${i}]` : path, paths); copy[i] = clone(element, cloned, DEV ? `${path}[${i}]` : path, paths);
} }
} }

Loading…
Cancel
Save