From eccc3cfe63109a5664d3f0b12ac1f35d3df0482f Mon Sep 17 00:00:00 2001 From: Chris Berry Date: Thu, 12 Oct 2017 09:30:42 -0700 Subject: [PATCH] fix(core): catch dismiss of confirmation/cancel modals (#4250) --- .../modules/core/src/cancelModal/cancelModal.service.ts | 6 +++++- .../src/confirmationModal/confirmationModal.service.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/scripts/modules/core/src/cancelModal/cancelModal.service.ts b/app/scripts/modules/core/src/cancelModal/cancelModal.service.ts index ea5c49dded6..93bca0ed843 100644 --- a/app/scripts/modules/core/src/cancelModal/cancelModal.service.ts +++ b/app/scripts/modules/core/src/cancelModal/cancelModal.service.ts @@ -34,7 +34,11 @@ export class CancelModalService { } }; - return this.$uibModal.open(modalArgs).result; + const result = this.$uibModal.open(modalArgs).result; + + result.catch(() => {}); + + return result; } } diff --git a/app/scripts/modules/core/src/confirmationModal/confirmationModal.service.ts b/app/scripts/modules/core/src/confirmationModal/confirmationModal.service.ts index ee3bf8114d9..0c36401cf63 100644 --- a/app/scripts/modules/core/src/confirmationModal/confirmationModal.service.ts +++ b/app/scripts/modules/core/src/confirmationModal/confirmationModal.service.ts @@ -51,7 +51,12 @@ export class ConfirmationModalService { if (params.size) { modalArgs.size = params.size; } - return this.$uibModal.open(modalArgs).result; + + const result = this.$uibModal.open(modalArgs).result; + + result.catch(() => {}); + + return result; } }