Open
Description
Describe the bug
When referencing properties of undefined
state, you'll get a "cryptic" error message: get(...) is undefined
, which is not very helpful while debugging. Filed as a Bug because I think exposing errors that reference the compiled code, is not the intended way of describing problems with the code to the dev.
Keep in mind that this is not only Svelte 5 specific. Svelte 4 also has these cryptic errors like ctx[0] is undefined
. It'd be nice if Svelte 5 finally fixes this.
Reproduction
Logs
No response
System Info
System:
OS: Linux 6.5 Pop!_OS 22.04 LTS
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-1235U
Memory: 7.08 GB / 15.32 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 19.3.0 - ~/.nvm/versions/node/v19.3.0/bin/node
npm: 9.2.0 - ~/.nvm/versions/node/v19.3.0/bin/npm
Browsers:
Chrome: 119.0.6045.199
Firefox: 120.0
Severity
annoyance