Skip to content

Commit bc16fb1

Browse files
committed
fix(hydration): clear rebuiltTail in settleClaim when the rebuilt root is not the range's whole content
When settleClaim decides not to sweep (because from !== rebuiltTail, meaning a later template root adopted the node at rebuiltTail), the stale rebuiltTail was left set. A subsequent lite replay of the same range would then call sweepRebuiltTail unconditionally, deleting the adopted sibling. Clear rebuiltTail in the else branch so that replay sweeps only fire for fresh values set during the replay's own rebuild.
1 parent e4cb20e commit bc16fb1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19482,6 +19482,8 @@ class HydrationCapability {
1948219482
if (from === this.rebuiltTail && from !== null) {
1948319483
this.sweepRebuiltTail(end);
1948419484
if (this.node === end) return;
19485+
} else {
19486+
this.rebuiltTail = null;
1948519487
}
1948619488
if (from === undefined) {
1948719489
// A slot that adopted a server node without a range parks the cursor

0 commit comments

Comments
 (0)