SDA-4689 - Fix condition for one notification (#2212)

This commit is contained in:
Kiran Niranjan
2024-10-03 21:52:49 +05:30
committed by GitHub
parent 079992b3e7
commit 481f8092ef

View File

@@ -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[] = [];