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

messageSync fails with invalid JSON when present with other librairies #599

Open
jean343 opened this issue Apr 3, 2024 · 0 comments
Open

Comments

@jean343
Copy link

jean343 commented Apr 3, 2024

Describe the bug

I am created a persisted signal with messageSync() and setting it this way.

  return makePersisted(createSignal(value, options), {
    sync: isServer ? undefined : messageSync(),
    storage: cookieStorage.withOptions!({ path: "/", sameSite: "Lax", secure: true }),
  });

The problem with messageSync is that it expects any messages on the domain to be a JSON string. In our app, we are getting JSON objects from "react-devtools-content-script". I would expect messageSync to accept any types of messages without throwing exceptions.

image

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