From 454a98dc23657ac3f541445bc8146e6ddae3786f Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 4 Aug 2023 13:49:32 -0700 Subject: [PATCH] app: disable service worker on localhost Signed-off-by: Varun Patil --- src/App.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/App.vue b/src/App.vue index f610257b..5c7c13cf 100644 --- a/src/App.vue +++ b/src/App.vue @@ -293,6 +293,12 @@ export default defineComponent({ async beforeMount() { if ('serviceWorker' in navigator) { + // Check if dev instance + if (window.location.hostname === 'localhost') { + console.warn('Service Worker is not enabled on localhost.'); + return; + } + // Get the config before loading const previousVersion = staticConfig.getSync('version');