mirror of https://github.com/sveltejs/svelte
- Replace `onerror={(e) => errors.push(e.message)}` with `onerror={() => {}}`
in main.svelte; `errors` was an undeclared global (undefined at runtime),
disconnected from the dead `const errors = []` in _config.js.
- Remove the dead `const errors = []` declaration and its stale comment.
- Wrap the unmount flushSync in try/catch: when the boundary is torn down
together with the component all ancestor boundary effects carry DESTROYING,
so invoke_error_boundary finds no live handler and re-throws synchronously.
The real TypeError (null.value) escaping is acceptable.
- Tighten the assertion to match only "reading 'error'" — the specific
null-dereference crash (#18485) this test guards against — rather than
the overly broad "Cannot read properties of null" which also matched
the original application error.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
pull/18486/head
parent
7a40b0bee5
commit
c3fc325dba
Loading…
Reference in new issue