Skip to content

Commit a95f107

Browse files
authored
Merge pull request #67 from Psypeal/fix/notification-crash
fix: guard Notification.isSupported for standalone/Docker (#42)
2 parents c4975f1 + a7d7bac commit a95f107

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/main/services/infrastructure/NotificationManager.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,12 @@ export class NotificationManager extends EventEmitter {
373373
* Shows a native macOS notification for an error.
374374
*/
375375
private showNativeNotification(error: DetectedError): void {
376-
// Check if Notification is supported
377-
if (!Notification.isSupported()) {
376+
// Guard against standalone/Docker mode where Electron's Notification API is unavailable
377+
if (
378+
typeof Notification === 'undefined' ||
379+
typeof Notification.isSupported !== 'function' ||
380+
!Notification.isSupported()
381+
) {
378382
logger.warn('Native notifications not supported');
379383
return;
380384
}

0 commit comments

Comments
 (0)