From 82084cdf7bc643d6feb2546ccfa672673b76eebd Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Sun, 31 May 2020 20:39:07 +0200 Subject: [PATCH] fix(dbx): unwanted error swallow --- src/app/core/persistence/persistence.service.ts | 3 +-- src/app/core/snack/snack-custom/snack-custom.component.ts | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/app/core/persistence/persistence.service.ts b/src/app/core/persistence/persistence.service.ts index 726148077c..62e05ba811 100644 --- a/src/app/core/persistence/persistence.service.ts +++ b/src/app/core/persistence/persistence.service.ts @@ -303,9 +303,8 @@ export class PersistenceService { ]) .then(() => { this.updateLastLocalSyncModelChange(data.lastLocalSyncModelChange); - this._isBlockSaving = false; }) - .catch(() => { + .finally(() => { this._isBlockSaving = false; }); } diff --git a/src/app/core/snack/snack-custom/snack-custom.component.ts b/src/app/core/snack/snack-custom/snack-custom.component.ts index 43ff18fec5..ccdcecd2d5 100644 --- a/src/app/core/snack/snack-custom/snack-custom.component.ts +++ b/src/app/core/snack/snack-custom/snack-custom.component.ts @@ -21,9 +21,7 @@ export class SnackCustomComponent implements OnInit, OnDestroy { ngOnInit() { if (this.data.promise) { - this.data.promise.then(() => { - this.snackBarRef.dismiss(); - }).catch(() => { + this.data.promise.finally(() => { this.snackBarRef.dismiss(); }); }