From 32c7ee5805f12e9f65f21d3f012bd259e0c113cd Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Thu, 21 Jul 2022 22:53:23 +0700 Subject: [PATCH] Update service worker --- src/components/ServiceWorker.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ServiceWorker.svelte b/src/components/ServiceWorker.svelte index 312bbdbb..1ec55af8 100644 --- a/src/components/ServiceWorker.svelte +++ b/src/components/ServiceWorker.svelte @@ -30,7 +30,7 @@ } onMount(() => { - if ('serviceWorker' in navigator) { + if ('serviceWorker' in navigator && import.meta.env.PROD) { broadcastChannel = new BroadcastChannel('paimonmoe-sw'); broadcastChannel.addEventListener('message', (event) => { if (event.data.type === 'update') refreshUpdate();