From 9950d98a2ec1c315e5f0d586d4f97dc964940679 Mon Sep 17 00:00:00 2001 From: Andrea Stagi Date: Fri, 27 Jan 2023 22:00:45 +0100 Subject: [PATCH] fix: assert non null elements on notification component --- .../components/core/notifications/notifications.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/design-angular-kit/src/lib/components/core/notifications/notifications.component.ts b/projects/design-angular-kit/src/lib/components/core/notifications/notifications.component.ts index cef1520d..3dcaa576 100644 --- a/projects/design-angular-kit/src/lib/components/core/notifications/notifications.component.ts +++ b/projects/design-angular-kit/src/lib/components/core/notifications/notifications.component.ts @@ -45,7 +45,7 @@ export class NotificationsComponent implements OnDestroy { setTimeout(() => { // Show the notification - new BSNotification(document.getElementById(newNotification.id), { + new BSNotification(document.getElementById(newNotification.id)!, { timeout: notification.duration }).show(); @@ -70,6 +70,6 @@ export class NotificationsComponent implements OnDestroy { * @param id */ hideNotification(id: string): void { - BSNotification.getInstance(document.getElementById(id))?.hide(); + BSNotification.getInstance(document.getElementById(id)!)?.hide(); } }