From a991a961f624219b393fbae116cc0343bdb5e799 Mon Sep 17 00:00:00 2001 From: Danny Qiu Date: Thu, 28 Dec 2017 08:13:34 -0500 Subject: Check that notification onclick is a function before calling --- src/webview/notifications.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/webview/notifications.js') diff --git a/src/webview/notifications.js b/src/webview/notifications.js index 4f602bfdb..2020bbdc6 100644 --- a/src/webview/notifications.js +++ b/src/webview/notifications.js @@ -16,7 +16,9 @@ class Notification { })); ipcRenderer.once(`notification-onclick:${this.notificationId}`, () => { - this.onclick(); + if (typeof this.onclick === 'function') { + this.onclick(); + } }); } -- cgit v1.2.3-54-g00ecf