From 2be5a0d5e441ef71568b75a738c5b07b738ab973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Sat, 8 Feb 2020 19:47:00 +0100 Subject: fix for browsers with sw disabled --- js/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 97e671f..33a0f55 100644 --- a/js/app.js +++ b/js/app.js @@ -5,8 +5,10 @@ if ("serviceWorker" in navigator) { } // Listen to messages from service workers. +if(navigator.serviceWorker)( navigator.serviceWorker.addEventListener('message', (event) => { if (event.data.msg === "install") { window.location.replace("/index.html"); } -}); \ No newline at end of file +}); +) -- cgit v1.2.3