app: re-enable sw on localhost
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/953/head
parent
14702f7669
commit
1971c5e3ce
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue