Skip to content

Commit

Permalink
Notification crash for in memory macos Apps (#49)
Browse files Browse the repository at this point in the history
Notification crash for in memory macos Apps
  • Loading branch information
MatthieuLemoine authored Aug 23, 2019
2 parents 950282e + 519e337 commit 9330cf6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ function onNotification(webContents) {
// Update persistentId
config.set('persistentIds', [...persistentIds, persistentId]);
// Notify the renderer process that a new notification has been received
webContents.send(NOTIFICATION_RECEIVED, notification);
// And check if window is not destroyed for darwin Apps
if(!webContents.isDestroyed()){
webContents.send(NOTIFICATION_RECEIVED, notification);
}
};
}

0 comments on commit 9330cf6

Please sign in to comment.