Fix exception thrown when notification is not provided onActivate

This commit is contained in:
Ben Gotow 2017-10-20 11:24:30 -07:00
parent 5da7cddecf
commit 4c92fa788f
2 changed files with 4 additions and 1 deletions

View file

@ -106,6 +106,9 @@ export class Notifier {
NativeNotifications.displayNotification({
title: `${this.unnotifiedQueue.length} Unread Messages`,
tag: 'unread-update',
onActivate: () => {
AppEnv.displayWindow();
},
});
this.unnotifiedQueue = [];
}

View file

@ -22,7 +22,7 @@ class NativeNotifications {
});
}
}
displayNotification({ title, subtitle, body, tag, canReply, onActivate } = {}) {
displayNotification({ title, subtitle, body, tag, canReply, onActivate = () => {} } = {}) {
let notif = null;
if (MacNotifierNotification) {