mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-01 13:14:16 +08:00
Fix exception thrown when notification is not provided onActivate
This commit is contained in:
parent
5da7cddecf
commit
4c92fa788f
2 changed files with 4 additions and 1 deletions
|
@ -106,6 +106,9 @@ export class Notifier {
|
|||
NativeNotifications.displayNotification({
|
||||
title: `${this.unnotifiedQueue.length} Unread Messages`,
|
||||
tag: 'unread-update',
|
||||
onActivate: () => {
|
||||
AppEnv.displayWindow();
|
||||
},
|
||||
});
|
||||
this.unnotifiedQueue = [];
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue