Skip to content

Commit bb76ca1

Browse files
committed
fix(hydration): record inserted keyed-list rows so owns() rejects them on retry
An inserted keyed-list row client-mounts under suspend() but was never passed to recordUpdate. owns() only refuses recorded blocks, so a later retry that resumes that row would see it as hydration-owned and could adopt a sibling's server nodes. Record the block after the suspended mount so that owns() correctly returns false for inserted rows.
1 parent 1e7bf8d commit bb76ca1

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
@@ -45831,7 +45831,7 @@ function mountItem<T>(
4583145831
: '',
4583245832
);
4583345833
}
45834-
return hydration.suspend(() =>
45834+
const block = hydration.suspend(() =>
4583545835
mountItem(
4583645836
parentBlock,
4583745837
parentNode,
@@ -45845,6 +45845,8 @@ function mountItem<T>(
4584545845
ssrMarkerless,
4584645846
),
4584745847
);
45848+
if (inserted) hydration.recordUpdate(block);
45849+
return block;
4584845850
}
4584945851
if (
4585045852
singleRoot === true ||

0 commit comments

Comments
 (0)