You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c26522c
Browse filesBrowse the repository at this point in the historyBrowse files
fix(compiler): fall back to rootScope for missing nodeScopes entries and unwrap TS expressions in namespace hook recovery
Three sites in the optional-call hook recovery treated a missing nodeScopes
entry as evidence the callee was locally scoped, mapping it to a null binding
and failing the root-scope check. This caused rebuilt optional calls to proven
setup hooks (readContext?.(), useTheme?.()) to be misclassified as pure
projections by Strong mode, freezing context, state, and effects. Fall back
to lexical.rootScope — matching the existing namespace path — so the
conservative direction is to treat the call as module-scoped.
The namespace optional-call branch also read callee.object and callee.property
without unwrapTsExpr, so parenthesized or assertion-wrapped receivers like
(Octane as any).useContext?.() never matched. Unwrap both before the type
check so TS syntax does not prevent hook identification.
0 commit comments