app: disable service worker on localhost
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/767/head
parent
7e08319f78
commit
454a98dc23
|
@ -293,6 +293,12 @@ export default defineComponent({
|
||||||
|
|
||||||
async beforeMount() {
|
async beforeMount() {
|
||||||
if ('serviceWorker' in navigator) {
|
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
|
// Get the config before loading
|
||||||
const previousVersion = staticConfig.getSync('version');
|
const previousVersion = staticConfig.getSync('version');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue