Skip to content

Commit 03dd48c

Browse files
committed
fix(hydration): stop fragmentRemainder from walking past enclosing block close
When a trailing comment hole in fragmentRemainder has no server content, actual lands on the enclosing range's close marker. sibling() treats block closes as ordinary nodes and walks past them, so inPlaceEnd would escape the @if/@for frame. Guard the advance with isBlockClose so the remainder stays on the close marker instead of past it.
1 parent b79077b commit 03dd48c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/octane/src/runtime.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20165,7 +20165,9 @@ class HydrationCapability {
2016520165
) {
2016620166
return undefined;
2016720167
}
20168-
actual = this.sibling(actual, 1);
20168+
// A block close is the enclosing range's boundary. A comment hole whose
20169+
// server content is missing lands here; do not walk past it.
20170+
if (!isBlockClose(actual)) actual = this.sibling(actual, 1);
2016920171
expected = getNextSibling(expected);
2017020172
childIndex++;
2017120173
}

0 commit comments

Comments
 (0)