diff --git a/src/main/resources/web/js/page.js b/src/main/resources/web/js/page.js index d887fb4..bb4e047 100644 --- a/src/main/resources/web/js/page.js +++ b/src/main/resources/web/js/page.js @@ -132,10 +132,12 @@ function refreshAccountList() { function renderActions() { actions.innerHTML = ""; - if (Notification.permission === "default") { - actions.innerHTML += '

Enable notifications

'; - $("#notificate").on("click", () => Notification.requestPermission().then(renderActions)); // i'm lazy - } + try { + if (Notification.permission === "default") { + actions.innerHTML += '

Enable notifications

'; + $("#notificate").on("click", () => Notification.requestPermission().then(renderActions)); // i'm lazy + } + } catch (ignored) { } // Why apple??? Why you don't support notifications??? if (listenVisible) { if (mcIdUsername != null && mcauth_code != null) { addAction("Listen to " + mcIdUsername, () => {