Skip to content

Commit 2f5ca58

Browse files
committed
preallocate new children array
1 parent 2d76a3b commit 2f5ca58

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/diff/children.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ function constructNewChildrenArray(
166166

167167
let skew = 0;
168168

169-
newParentVNode._children = [];
169+
newParentVNode._children = new Array(newChildrenLength);
170170
for (i = 0; i < newChildrenLength; i++) {
171171
// @ts-expect-error We are reusing the childVNode variable to hold both the
172172
// pre and post normalized childVNode

0 commit comments

Comments
 (0)