Repository navigation
Commit 9ffe9fa
committed
fix(hydration): guard speculative save() rollback against detached arm bounds
The speculative save() undo closure called restoreRootRange unconditionally.
If removeHydrationRange detached the arm's end marker before rollback, the
restore walk would never find the detached end, stripping all later siblings,
and restoreRootNodes would throw NotFoundError from insertBefore.
Add the same parentNode guard that journalRootRange already uses: skip the
restore when before or after is no longer a child of parent.1 parent 85f67f3 commit 9ffe9fa
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18729 | 18729 | | |
18730 | 18730 | | |
18731 | 18731 | | |
18732 | | - | |
| 18732 | + | |
| 18733 | + | |
| 18734 | + | |
| 18735 | + | |
| 18736 | + | |
| 18737 | + | |
| 18738 | + | |
| 18739 | + | |
18733 | 18740 | | |
18734 | 18741 | | |
18735 | 18742 | | |
| |||
0 commit comments