Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SvelteKit and undefined readyState #641

Open
jaclas opened this issue May 24, 2022 · 0 comments
Open

SvelteKit and undefined readyState #641

jaclas opened this issue May 24, 2022 · 0 comments

Comments

@jaclas
Copy link

jaclas commented May 24, 2022

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
epsvelte@0.0.1 /home/jacek/storage/developSSD/epsvelte
├── @sveltejs/kit@1.0.0-next.342
├── svelte-websocket-store@1.1.24
└── svelte@3.48.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant