Update service worker

pull/1/head
Made Baruna 2022-07-21 22:53:23 +07:00
parent 593938c36d
commit 32c7ee5805
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
} }
onMount(() => { onMount(() => {
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator && import.meta.env.PROD) {
broadcastChannel = new BroadcastChannel('paimonmoe-sw'); broadcastChannel = new BroadcastChannel('paimonmoe-sw');
broadcastChannel.addEventListener('message', (event) => { broadcastChannel.addEventListener('message', (event) => {
if (event.data.type === 'update') refreshUpdate(); if (event.data.type === 'update') refreshUpdate();