diff --git a/app/services/sync.ts b/app/services/sync.ts index f93d8391..537a250f 100644 --- a/app/services/sync.ts +++ b/app/services/sync.ts @@ -386,7 +386,8 @@ export class SyncService extends Observable { event?: DocumentEvents; } = {}) { try { - if (!this.enabled) { + const db = documentsService.db?.db?.db; + if (!this.enabled || !db) { return; } // send syncState event right now for the UI to be updated as soon as possible