Skip to content

🎧 Your Personal Streaming Service

Fix cacheUndefined bug - #901 (#915)

Aldrin Jenson5245b4c62b73
diff --git a/ui/src/authProvider.js b/ui/src/authProvider.js
index e64798cad..dacffc656 100644
--- a/ui/src/authProvider.js
+++ b/ui/src/authProvider.js
@@ -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 = () => {