Repository navigation
Commit eede0ad
committed
fix(hydration): update block markers after rebuiltAt removes the stamped boundary
When an unframed singleRoot component rebuilds during hydration and then
suspends before commitBag, the finally block stamps the mismatched server
node as the block boundary (startMarker/endMarker). When the retry later
commits, rebuiltAt removes that server node, leaving the block markers
detached. A subsequent identity change or unmount then fails to remove
the committed rebuilt root from the DOM.
Fix by checking in commitBag whether rebuiltAt just detached the block's
markers, and if so, updating them to point to the root that replaced the
removed server node. This mirrors the singleRoot self-mark pattern where
startMarker === endMarker === the root element.1 parent 9ba872a commit eede0ad
1 file changed
Lines changed: 14 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20892 | 20892 | | |
20893 | 20893 | | |
20894 | 20894 | | |
20895 | | - | |
20896 | | - | |
20897 | | - | |
20898 | | - | |
| 20895 | + | |
| 20896 | + | |
| 20897 | + | |
| 20898 | + | |
| 20899 | + | |
| 20900 | + | |
| 20901 | + | |
| 20902 | + | |
| 20903 | + | |
| 20904 | + | |
| 20905 | + | |
| 20906 | + | |
| 20907 | + | |
| 20908 | + | |
20899 | 20909 | | |
20900 | 20910 | | |
20901 | 20911 | | |
| |||
0 commit comments