Skip to content

Provider emits 'synced' on close #883

Open
@mnzaki

Description

@mnzaki

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions