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

Provider emits 'synced' on close #883

Open
mnzaki opened this issue Dec 5, 2024 · 0 comments
Open

Provider emits 'synced' on close #883

mnzaki opened this issue Dec 5, 2024 · 0 comments
Assignees

Comments

@mnzaki
Copy link

mnzaki commented Dec 5, 2024

Description
Based on this line which triggers this setter, the provider emits a synced event with { state: false } on close.
This contradicts the expected behavior based on the docs which describe the synced event as:

When the Y.js document is successfully synced (initially).

In general the { state } of a synced event doesn't make sense to me, what does it mean when it is false?

Steps to reproduce the bug

  1. Construct a provider with an onSynced handler
  2. synced emit on initial sync
  3. Close provider
  4. synced emitted again

Expected behavior
synced should only be emitted on initial sync

@mnzaki mnzaki added the bug Something isn't working label Dec 5, 2024
@janthurau janthurau added next-major and removed bug Something isn't working labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants