Skip to content

Commit cf9f6aa

Browse files
authored
fix(core): fix typo in notifications, closes #2330 (#2331)
* fix(core): fix typo in notifications, closes #2330 * Update core-notification-typo.md * [skip ci]
1 parent 4678144 commit cf9f6aa

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changes/core-notification-typo.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"tauri": patch
3+
---
4+
5+
Fix `Notification.requestPermission()` throwing `Unhandled Promise Rejection: TypeError: undefined is not a function (near '...window.__TAURI__.invoke...')`

core/tauri/scripts/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ if (!String.prototype.startsWith) {
260260

261261
function requestPermission() {
262262
return window.__TAURI__
263-
.invoke(
263+
._invoke(
264264
'tauri',
265265
{
266266
__tauriModule: 'Notification',

0 commit comments

Comments
 (0)