From f56a6f73f4dd4898f413e2c7b24ebd4b26caefce Mon Sep 17 00:00:00 2001 From: Kieran Date: Fri, 6 Jan 2023 15:10:02 +0000 Subject: [PATCH] Check Notification is supported --- src/pages/Layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Layout.js b/src/pages/Layout.js index 22c76d51..60946f8d 100644 --- a/src/pages/Layout.js +++ b/src/pages/Layout.js @@ -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);