reload page if ui is not present
This commit is contained in:
parent
a0a19468a8
commit
3d1d38a2c0
|
@ -40,7 +40,6 @@ const connectApp = function (readSw) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
background.on('ready', (sw) => {
|
background.on('ready', (sw) => {
|
||||||
background.removeListener('updatefound', connectApp)
|
background.removeListener('updatefound', connectApp)
|
||||||
connectApp(sw)
|
connectApp(sw)
|
||||||
|
@ -48,5 +47,10 @@ background.on('ready', (sw) => {
|
||||||
background.on('updatefound', () => window.location.reload())
|
background.on('updatefound', () => window.location.reload())
|
||||||
|
|
||||||
background.startWorker()
|
background.startWorker()
|
||||||
// background.startWorker()
|
.then(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
const appContent = document.getElementById(`app-content`)
|
||||||
|
if (!appContent.children.length) window.location.reload()
|
||||||
|
}, 2000)
|
||||||
|
})
|
||||||
console.log('hello from MetaMascara ui!')
|
console.log('hello from MetaMascara ui!')
|
||||||
|
|
Loading…
Reference in New Issue