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

This commit is contained in:
Kiran Niranjan 2024-10-03 21:52:54 +05:30 committed by GitHub
parent d702a5580e
commit 769b26e28a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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