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',