Only emit "load" when sync is set to true

This commit is contained in:
Samy Pessé 2023-10-22 11:03:25 +02:00 committed by GitHub
parent 9a7b659919
commit e7572d61c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ export class Doc extends Observable {
this.whenSynced = provideSyncedPromise()
}
this.isSynced = isSynced === undefined || isSynced === true
if (!this.isLoaded) {
if (this.isSynced && !this.isLoaded) {
this.emit('load', [])
}
})