Skip to content

Commit

Permalink
see if adding this branch back affects perf
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Feb 22, 2024
1 parent 92380e4 commit 0435d0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/diff/children.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ function constructNewChildrenArray(newParentVNode, renderResult, oldChildren) {
if (matchingIndex === skewedIndex + 1) {
skew++;
} else if (matchingIndex > skewedIndex) {
if (remainingOldChildren <= newChildrenLength - skewedIndex) {
if (remainingOldChildren > newChildrenLength - skewedIndex) {
skew += matchingIndex - skewedIndex;
} else {
skew--;
}
} else if (matchingIndex < skewedIndex) {
Expand Down

0 comments on commit 0435d0c

Please sign in to comment.