Describe the bug
I have implemented my own store with a proxy implementation, so that i don't have to call store.set(...) or store.update(...).
This works perfectly fine if the store is used in a component without Auto-Subscription of the store. But as soon as the store is used in a component which Auto-Subscribes the store, the app crashes and doesn't even show the page. Just a console error Cannot read property 'foo' of undefined. Even though the implementation is exactly the same.
To Reproduce
Repl:
https://svelte.dev/repl/c1b53139e2bb45be8eec3f23d5530770?version=3.23.2
First click on the button Change Foo in Test.svelte. Everything works as expected. Then try to uncomment // proxyStore.foo = "Bar"; in App.svelte and you will see the error Cannot read property 'foo' of undefined
Expected behavior
No errors are shown and changing the property of the store should work also in the component that uses Auto-Subscription
Information about your Svelte project:
-
Chrome
-
Linux Mint
-
Svelte version 3.23.2
-
Rollup
Severity
Very annoying bug. Unexpected behavior
Describe the bug
I have implemented my own store with a proxy implementation, so that i don't have to call
store.set(...)orstore.update(...).This works perfectly fine if the store is used in a component without Auto-Subscription of the store. But as soon as the store is used in a component which Auto-Subscribes the store, the app crashes and doesn't even show the page. Just a console error
Cannot read property 'foo' of undefined. Even though the implementation is exactly the same.To Reproduce
Repl:
https://svelte.dev/repl/c1b53139e2bb45be8eec3f23d5530770?version=3.23.2
First click on the button Change Foo in Test.svelte. Everything works as expected. Then try to uncomment
// proxyStore.foo = "Bar";in App.svelte and you will see the errorCannot read property 'foo' of undefinedExpected behavior
No errors are shown and changing the property of the store should work also in the component that uses Auto-Subscription
Information about your Svelte project:
Chrome
Linux Mint
Svelte version 3.23.2
Rollup
Severity
Very annoying bug. Unexpected behavior