Repository navigation
Commit 820abeb
committed
fix(hydration): sweep rebuilt tail on retry and fix markerless in-place cursor
Bug 1: A deferred same-block retry re-enters renderBranchSlot with
state.block already set. That path only called renderBlock without
sweepRebuiltTail, so unclaimed server nodes after a rebuilt root
survived when the first attempt suspended before sweeping. Add the
sweep after renderBlock in the retry path.
Bug 2: The markerless branch path called renderBlock directly when a
server node at the cursor could be adopted in place. clone() leaves
the cursor on the adopted root, and holes inside it move the cursor
into its children. markerlessEnd then saw the cursor outside the
branch parent and returned after, overclaiming following siblings.
Wrap the render in renderInPlace when there is a cursor, which steps
the cursor past the adopted root after a successful adoption.1 parent 204479b commit 820abeb
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42306 | 42306 | | |
42307 | 42307 | | |
42308 | 42308 | | |
42309 | | - | |
| 42309 | + | |
| 42310 | + | |
42310 | 42311 | | |
42311 | 42312 | | |
42312 | 42313 | | |
| |||
42392 | 42393 | | |
42393 | 42394 | | |
42394 | 42395 | | |
| 42396 | + | |
| 42397 | + | |
42395 | 42398 | | |
42396 | 42399 | | |
42397 | 42400 | | |
| |||
0 commit comments