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

Default value in values schema is being sent as a write op to connected peers #167

Open
jamesgpearce opened this issue Aug 2, 2024 Discussed in #165 · 1 comment
Open

Comments

@jamesgpearce
Copy link
Contributor

Discussed in #165

Originally posted by haggen July 28, 2024
So here's the situation; I have a typed store with a key x in Values, and I also am using a WebSocket synchronizer. Whenever a new client connects to the synchronizer server, the current value of x is overwritten with its default value.

I was expecting the new client to receive the latest value instead of zeroing it for everyone.

Is that by design or a bug?

@Joao620
Copy link

Joao620 commented Jan 4, 2025

Having the same problem right now! The solution for me was removing the default field, and handle the 'undefined' case on the code
I'll try to post a codepen reproducing the bug later

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

2 participants