Skip to content

Commit

Permalink
add hyrating check back
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed May 18, 2023
1 parent 598959c commit 1582306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/diff/children.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ export function diffChildren(
firstChildDom = newDom;
}

let isMounting = oldVNode === EMPTY_OBJ || oldVNode._original === null;
let isMounting =
isHydrating || oldVNode === EMPTY_OBJ || oldVNode._original === null;
let hasMatchingIndex = !isMounting && matchingIndex === skewedIndex;
if (isMounting) {
if (matchingIndex == -1) {
Expand Down Expand Up @@ -187,7 +188,6 @@ export function diffChildren(
hasMatchingIndex || (matchingIndex == i && !isMounting);

if (
!isHydrating &&
!isMounting &&
typeof childVNode.type == 'function' &&
(matchingIndex !== skewedIndex ||
Expand Down

0 comments on commit 1582306

Please sign in to comment.