Skip to content

Commit 9abdd84

Browse files
committed
fix: consult onUncaughtError on sync first render and gate Float scripts through template normalization
- runtime: The sync first-render path now calls reportUncaughtError before rethrowing when handleRenderError fails, matching the scheduled flush path. A root created with onUncaughtError now receives the callback on mount errors instead of unconditionally rethrowing. - compiler: requiresTemplateNormalization now checks headResourceKind in addition to HOISTABLE_HEAD_TAGS, so return-position <script async src> trees enter the normalizer and reach the HeadHoist path that normalizeChildren already admits.
1 parent 57eb579 commit 9abdd84

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/octane/src/compiler/compile.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16316,6 +16316,7 @@ function requiresTemplateNormalization(
1631616316
(tag !== 'link' || isHoistableHeadElementNode(node))
1631716317
)
1631816318
return true;
16319+
if (selfNs !== 'svg' && headResourceKind(node) !== null) return true;
1631916320

1632016321
const childNs =
1632116322
typeof tag === 'string' && !isComponentTag(node) ? nsForChildren(tag, parentNs) : parentNs;

‎packages/octane/src/runtime.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27228,6 +27228,7 @@ function makeRoot(
2722827228
// later recovery render. In particular, effects registered before the
2722927229
// throw belong to an aborted render and must never reach a later flush.
2723027230
if (!mountedRoot.disposed) unmountBlock(mountedRoot);
27231+
if (reportUncaughtError(mountedRoot, unhandled)) return;
2723127232
throw unhandled;
2723227233
}
2723327234
root.unmount();

0 commit comments

Comments
 (0)