Skip to content

Commit

Permalink
Make sure to transfer dom refs
Browse files Browse the repository at this point in the history
  • Loading branch information
twharmon committed Feb 17, 2024
1 parent cf074a2 commit 872076b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/reconcile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ export let reconcile = (oldElem: Elem, newElem: Elem): void => {
}
if (oldElem.v) {
newElem.h = oldElem.h;
if (!newElem.p && ! oldElem.p) return;
if (oldElem.m && newElem.m && areDepsEqual(oldElem.m, newElem.m)) {
if ((!newElem.p && ! oldElem.p) || (oldElem.m && newElem.m && areDepsEqual(oldElem.m, newElem.m))) {
newElem.v = oldElem.v;
return;
}
Expand Down

0 comments on commit 872076b

Please sign in to comment.