app: re-enable sw on localhost

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/953/head
Varun Patil 2023-11-25 11:13:25 -08:00
parent 14702f7669
commit 1971c5e3ce
1 changed files with 1 additions and 4 deletions

View File

@ -269,10 +269,7 @@ export default defineComponent({
}, },
async beforeMount() { async beforeMount() {
if (window.location.hostname === 'localhost') { if ('serviceWorker' in navigator) {
// Disable on dev instances
console.warn('Service Worker is not enabled on localhost.');
} else if ('serviceWorker' in navigator) {
// Use the window load event to keep the page load performant // Use the window load event to keep the page load performant
window.addEventListener('load', async () => { window.addEventListener('load', async () => {
try { try {