parent
1cb428b489
commit
3435ab35c9
11
src/App.vue
11
src/App.vue
|
@ -310,13 +310,10 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
|
|
||||||
async beforeMount() {
|
async beforeMount() {
|
||||||
if ('serviceWorker' in navigator) {
|
if (window.location.hostname === 'localhost') {
|
||||||
// Check if dev instance
|
// Disable on dev instances
|
||||||
if (window.location.hostname === 'localhost') {
|
console.warn('Service Worker is not enabled on localhost.');
|
||||||
console.warn('Service Worker is not enabled on localhost.');
|
} else if ('serviceWorker' in navigator) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the config before loading
|
// Get the config before loading
|
||||||
const previousVersion = staticConfig.getSync('version');
|
const previousVersion = staticConfig.getSync('version');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue