From 78b885b22e99fce8026fa5b6a57785394e8cae00 Mon Sep 17 00:00:00 2001 From: Maxwell Jeffress Date: Sun, 24 Nov 2024 14:13:05 +1100 Subject: [PATCH] Fix critical mobile WebKit bug --- client-web/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client-web/index.js b/client-web/index.js index 3b29be2..91d9e08 100644 --- a/client-web/index.js +++ b/client-web/index.js @@ -80,7 +80,9 @@ function connect() { var incorrectDetail = 0; ws.onopen = () => { - Notification.requestPermission(); + if (typeof Notification !== "undefined") { + Notification.requestPermission(); + } console.log('Connected!'); document.getElementById('login').style.display = 'none'; document.getElementById('messaging').style.display = 'block';