- add check to see if cache is defined before deleting
This commit is contained in:
parent
3b0defefec
commit
5245b4c62b
1 changed files with 4 additions and 3 deletions
|
|
@ -99,9 +99,10 @@ const removeItems = () => {
|
|||
}
|
||||
|
||||
const clearServiceWorkerCache = () => {
|
||||
caches.keys().then(function (keyList) {
|
||||
for (let key of keyList) caches.delete(key)
|
||||
})
|
||||
window.caches &&
|
||||
caches.keys().then(function (keyList) {
|
||||
for (let key of keyList) caches.delete(key)
|
||||
})
|
||||
}
|
||||
|
||||
const generateSubsonicSalt = () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue