Skip to content

Commit

Permalink
PollingBackend might be undefined on SyncService.close()
Browse files Browse the repository at this point in the history
Fixes: #3918
  • Loading branch information
mejo- committed Mar 13, 2023
1 parent 4a2cb66 commit c4de248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class SyncService {
}

async close() {
this.backend.disconnect()
this.backend?.disconnect()
const timeout = new Promise((resolve) => setTimeout(resolve, 2000))
await Promise.any([timeout, this.save()])
return this._close()
Expand Down

0 comments on commit c4de248

Please sign in to comment.