Repository navigation
Commit 2e1215e
committed
fix: set TEARDOWN_BLOCK in resetScopeChildren and collect nested HeadHoist on client
Bug 1: resetScopeChildren installed TEARDOWN_HANDLER when depth was zero
but never assigned TEARDOWN_BLOCK, so teardown errors during mid-render
deletion cleanups (e.g. Provider dialect flips) routed through
reportCaughtError/reportUncaughtError with a null owner, causing
root-level onCaughtError/onUncaughtError callbacks to be silently
skipped. Add the missing TEARDOWN_BLOCK = block assignment to match the
pattern used by unmountBlock and resetHmrBlock.
Bug 2: The SSR compiler emitted nested HeadHoist nodes (title/meta/link
inside host elements) via ssrHeadEl/ssrStylesheetResource, but the
client-side emitElementHtml children walk had no HeadHoist case, silently
dropping them. Client-only renders omitted nested metadata and SSR'd
nested head tags were never adopted, updated, or removed on unmount.
Collect nested HeadHoist nodes during the emitElementHtml walk via a
ctx._nestedHeadNodes accumulator (save/restore pattern matching
_switchCalls and _portalCalls) and merge them with top-level head nodes
before emitHeadClient.1 parent 512dc65 commit 2e1215e
2 files changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19518 | 19518 | | |
19519 | 19519 | | |
19520 | 19520 | | |
| 19521 | + | |
| 19522 | + | |
| 19523 | + | |
| 19524 | + | |
19521 | 19525 | | |
19522 | 19526 | | |
19523 | 19527 | | |
| |||
20271 | 20275 | | |
20272 | 20276 | | |
20273 | 20277 | | |
20274 | | - | |
| 20278 | + | |
| 20279 | + | |
| 20280 | + | |
| 20281 | + | |
20275 | 20282 | | |
20276 | 20283 | | |
20277 | 20284 | | |
| |||
21078 | 21085 | | |
21079 | 21086 | | |
21080 | 21087 | | |
| 21088 | + | |
| 21089 | + | |
21081 | 21090 | | |
21082 | 21091 | | |
21083 | 21092 | | |
| |||
23689 | 23698 | | |
23690 | 23699 | | |
23691 | 23700 | | |
| 23701 | + | |
| 23702 | + | |
23692 | 23703 | | |
23693 | 23704 | | |
23694 | 23705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7016 | 7016 | | |
7017 | 7017 | | |
7018 | 7018 | | |
| 7019 | + | |
7019 | 7020 | | |
7020 | 7021 | | |
7021 | 7022 | | |
| |||
0 commit comments