From 481f8092ef0839b14b39a38d494ee7ada57f8eb3 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Thu, 3 Oct 2024 21:52:49 +0530 Subject: [PATCH] SDA-4689 - Fix condition for one notification (#2212) --- src/renderer/notification-handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/notification-handler.ts b/src/renderer/notification-handler.ts index f3ce19a3b..3d5ada46c 100644 --- a/src/renderer/notification-handler.ts +++ b/src/renderer/notification-handler.ts @@ -373,13 +373,13 @@ export default class NotificationHandler { startPos: number, activeNotifications: BrowserWindow[], ): void { - if (startPos >= activeNotifications.length || startPos === -1) { + if (activeNotifications.length === 0 || startPos === -1) { return; } // Adjust startPos for lower corners if (['lower-right', 'lower-left'].includes(this.settings.startCorner)) { - startPos -= 1; + startPos = Math.max(0, startPos - 1); } const notificationPosArray: number[] = [];