From b15421b0597fa40d961db2e102d6b54059196b27 Mon Sep 17 00:00:00 2001 From: Danny Qiu Date: Tue, 14 Nov 2017 01:39:44 -0500 Subject: [PATCH] Fix application of onNotify --- src/webview/lib/RecipeWebview.js | 2 +- src/webview/notifications.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/webview/lib/RecipeWebview.js b/src/webview/lib/RecipeWebview.js index b8acc1258..048beea69 100644 --- a/src/webview/lib/RecipeWebview.js +++ b/src/webview/lib/RecipeWebview.js @@ -66,7 +66,7 @@ class RecipeWebview { onNotify(fn) { if (typeof fn === 'function') { - window.Notification.onNotify = fn; + window.Notification.prototype.onNotify = fn; } } diff --git a/src/webview/notifications.js b/src/webview/notifications.js index 4055b10de..4f602bfdb 100644 --- a/src/webview/notifications.js +++ b/src/webview/notifications.js @@ -10,9 +10,9 @@ class Notification { this.notificationId = uuidV1(); ipcRenderer.sendToHost('notification', this.onNotify({ + title: this.title, + options: this.options, notificationId: this.notificationId, - title, - options, })); ipcRenderer.once(`notification-onclick:${this.notificationId}`, () => {