Fix cacheUndefined bug - #901 (#915)

- add check to see if cache is defined before deleting
This commit is contained in:
Aldrin Jenson 2021-03-30 06:13:51 +05:30 committed by GitHub
parent 3b0defefec
commit 5245b4c62b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -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 = () => {