Skip to content

Commit

Permalink
Fix application of onNotify
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyqiu committed Nov 14, 2017
1 parent 3c54aa3 commit b15421b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/webview/lib/RecipeWebview.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class RecipeWebview {

onNotify(fn) {
if (typeof fn === 'function') {
window.Notification.onNotify = fn;
window.Notification.prototype.onNotify = fn;
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/webview/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`, () => {
Expand Down

0 comments on commit b15421b

Please sign in to comment.