-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
Been getting this error when traversing to a new page with the latest (2.50.2) release. Does not happen on 2.50.1 or earlier.
These may be red herrings: but I've only seen it happen (although pretty reliably) with Safari 26 (after a cache clear) and when navigating to a larger / more complex page. Only happens the first time visiting the page and doesn't seem to happen when you hover long enough over the link to preload everything. Since this looks to be some kind of race condition, it may be effecting other browsers but the race is just more difficult to produce.
Reproduction
I'll try to produce a smaller example.
Logs
From the safari console:
Unhandled Promise Rejection: ReferenceError: Cannot access 'component' before initialization. client.is:663
Stacktrace:
[Error]
ReferenceError: Cannot access 'component' before initialization.
(anonymous function) — client.js:663
map
get_navigation_result_from_branch — client.js:663
Unhandled Promise Rejection: ReferenceError: Cannot access 'component' before initialization. client.js:2572
Stacktrace:
[Error] Unhandled Promise Rejection: ReferenceError: Cannot access 'component' before initialization.
(anonymous function) (client.js:2572)System Info
System:
OS: macOS 15.7.3
CPU: (10) arm64 Apple M4
Memory: 192.55 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.12.0 - /Users/eriktribou/.nvm/versions/node/v22.12.0/bin/node
npm: 10.9.0 - /Users/eriktribou/.nvm/versions/node/v22.12.0/bin/npm
Browsers:
Chrome: 144.0.7559.133
Firefox: 120.0.1
Safari: 26.2
npmPackages:
@sveltejs/adapter-cloudflare: ^7.0.0 => 7.2.6
@sveltejs/kit: 2.50.2 => 2.50.2
@sveltejs/vite-plugin-svelte: ^6.0.0 => 6.2.4
svelte: ^5.45.0 => 5.50.0
vite: ^7.0.4 => 7.3.1Severity
blocking an upgrade
Additional Information
Offending line of the stack trace appears to be:
constructors: compact(branch).map((branch_node) => branch_node.node.component),