Skip to content

Commit d0cd034

Browse files
committed
fix cloning nodes with undefined values
1 parent 976e605 commit d0cd034

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/shallow-clone-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var shallowCloneNode = function(obj, parent) {
2424
}
2525
else {
2626
cloned[i] = value.map(function(j) {
27-
shallowCloneNode(j, cloned);
27+
j && shallowCloneNode(j, cloned);
2828
});
2929
}
3030
}

0 commit comments

Comments
 (0)