From 15671a37ab9f99635cf4eedddfac617df78a0d8e Mon Sep 17 00:00:00 2001 From: Marco Zirkenbach Date: Thu, 16 Jun 2022 11:07:45 +0200 Subject: [PATCH] fix(modal): remove promise rejection when no overlay exists bc promise should only be rejected when an error appears during dismiss of an existing overlay --- .../src/components/notice/bal-modal/bal-modal.controller.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/components/src/components/notice/bal-modal/bal-modal.controller.ts b/packages/components/src/components/notice/bal-modal/bal-modal.controller.ts index 1706f7a4ee..f7dac340a5 100644 --- a/packages/components/src/components/notice/bal-modal/bal-modal.controller.ts +++ b/packages/components/src/components/notice/bal-modal/bal-modal.controller.ts @@ -26,9 +26,6 @@ export class BalModalController { async dismissAll(data?: any, role?: string): Promise { const overlays = getOverlays(document, this.tag) - if (overlays.length < 1) { - return Promise.reject('overlay does not exist') - } await Promise.all(overlays.map(o => o.dismiss(data, role))) }