Closed ceifa closed 3 weeks ago
The first read (and, as a result, the store initialization) happens in the markup, so the error is correct.
Either read the store in the script (e.g. simple $store;
) or better wrap writing to the stateful variables with untrack.
The first read (and, as a result, the store initialization) happens in the markup, so the error is correct.
You are right. But the error message isn't. If not a bug, at least the error message should be more meaningful in this case.
Describe the bug
It throws an error when set the value of a rune inside the start notifier of a writable store:
Reproduction
https://svelte.dev/playground/hello-world?version=5.0.5#H4sIAAAAAAAACm2OwWrDMAyGX0UThSQQFno1jmG3vcO8g9Mq1ODYxlbaDeN3H-7W7bLj_-nXJxVcraOM4q0gf0ZCcQc4ojdbSy8xPucrOW5sMZn-46fgmTxnFCjzKdnISnvNdoshMRS4JctmcQQV1hQ26L43p8whUad9KztiuGeY4ZDZMPWrcZmGx7AdhvnX1Xe3kNy5G6EfYFZQWk_zQ8Fpp0bqoL2c_p7y8nJUr-RcgHJoyvokp8tRaS-tjzvDYv1ZXI3baf4pKByR6YNRNGl9r18XIK7LNQEAAA==
Logs
No response
System Info
Severity
blocking an upgrade