Skip to content

Commit

Permalink
mdwalters/notifications: Fix permission denied handling (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin authored Jun 22, 2024
1 parent 38be121 commit 9a0c594
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/mdwalters/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

const allowedByBrowser = await Notification.requestPermission();
if (!allowedByBrowser) {
if (allowedByBrowser === "denied") {
throw new Error("Denied by browser");
}

Expand Down

0 comments on commit 9a0c594

Please sign in to comment.