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

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- authored and backportbot-nextcloud[bot] committed Mar 13, 2023
1 parent 108325f commit 96d915e
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 96d915e

Please sign in to comment.