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';