From cf9f6aa148db31c6fd4e3571b301db18654a1249 Mon Sep 17 00:00:00 2001 From: Amr Bashir <48618675+amrbashir@users.noreply.github.com> Date: Mon, 2 Aug 2021 04:45:36 +0200 Subject: [PATCH] fix(core): fix typo in notifications, closes #2330 (#2331) * fix(core): fix typo in notifications, closes #2330 * Update core-notification-typo.md * [skip ci] --- .changes/core-notification-typo.md | 5 +++++ core/tauri/scripts/core.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/core-notification-typo.md diff --git a/.changes/core-notification-typo.md b/.changes/core-notification-typo.md new file mode 100644 index 000000000..45a49dd81 --- /dev/null +++ b/.changes/core-notification-typo.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Fix `Notification.requestPermission()` throwing `Unhandled Promise Rejection: TypeError: undefined is not a function (near '...window.__TAURI__.invoke...')` diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index a606d4351..340c99faf 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -260,7 +260,7 @@ if (!String.prototype.startsWith) { function requestPermission() { return window.__TAURI__ - .invoke( + ._invoke( 'tauri', { __tauriModule: 'Notification',