Check Notification is supported
This commit is contained in:
parent
274f400c7a
commit
f56a6f73f4
@ -37,7 +37,7 @@ export default function Layout(props) {
|
||||
async function goToNotifications(e) {
|
||||
e.stopPropagation();
|
||||
// request permissions to send notifications
|
||||
if (Notification.permission !== "granted") {
|
||||
if ("Notification" in window && Notification.permission !== "granted") {
|
||||
try {
|
||||
let res = await Notification.requestPermission();
|
||||
console.debug(res);
|
||||
|
Loading…
Reference in New Issue
Block a user