reload page if ui is not present

This commit is contained in:
frankiebee 2017-06-08 17:35:21 -07:00
parent a0a19468a8
commit 3d1d38a2c0
1 changed files with 6 additions and 2 deletions

View File

@ -40,7 +40,6 @@ const connectApp = function (readSw) {
})
})
}
background.on('ready', (sw) => {
background.removeListener('updatefound', connectApp)
connectApp(sw)
@ -48,5 +47,10 @@ background.on('ready', (sw) => {
background.on('updatefound', () => window.location.reload())
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!')