svelte-websocket-store
svelte-websocket-store copied to clipboard
SvelteKit and undefined readyState
I try to use this library, but I get error in browser:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'readyState') at Object.set (index.mjs:80:18)
My code:
const initialValue = { };
if (browser) {
const myStore = websocketStore("ws://localhost:3000/foo", initialValue);
myStore.set({
content: "to be saved",
other_values: "all"
});
}
I use latest Svelte's:
❯ npm list
[email protected] /home/jacek/storage/developSSD/epsvelte
├── @sveltejs/[email protected]
├── [email protected]
└── [email protected]