Skip to content

Commit 9330cf6

Browse files
Notification crash for in memory macos Apps (#49)
Notification crash for in memory macos Apps
2 parents 950282e + 519e337 commit 9330cf6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ function onNotification(webContents) {
6868
// Update persistentId
6969
config.set('persistentIds', [...persistentIds, persistentId]);
7070
// Notify the renderer process that a new notification has been received
71-
webContents.send(NOTIFICATION_RECEIVED, notification);
71+
// And check if window is not destroyed for darwin Apps
72+
if(!webContents.isDestroyed()){
73+
webContents.send(NOTIFICATION_RECEIVED, notification);
74+
}
7275
};
7376
}

0 commit comments

Comments
 (0)