mirror of https://github.com/dirtbags/moth.git
Apply suggestions from code review
Co-Authored-By: Neale Pickett <neale@woozle.org>
This commit is contained in:
parent
3e079616c1
commit
1ea739207b
|
@ -1,7 +1,8 @@
|
||||||
function pwa_init() {
|
function pwa_init() {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register("./sw.js").then(function(reg) {
|
navigator.serviceWorker.register("./sw.js").then(function(reg) {
|
||||||
}).catch(function(err) {
|
})
|
||||||
|
.catch(err => {
|
||||||
console.warn("Error while registering service worker", err)
|
console.warn("Error while registering service worker", err)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -133,7 +133,8 @@ function drawCacheButton(teamId) {
|
||||||
} else {
|
} else {
|
||||||
cacher.style.display = "none"
|
cacher.style.display = "none"
|
||||||
}
|
}
|
||||||
}).catch( ex => {
|
})
|
||||||
|
.catch(ex => {
|
||||||
cacher.style.display = "none"
|
cacher.style.display = "none"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue