about summary refs log tree commit diff
path: root/app/javascript/mastodon/service_worker/entry.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/mastodon/service_worker/entry.js')
-rw-r--r--app/javascript/mastodon/service_worker/entry.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/mastodon/service_worker/entry.js b/app/javascript/mastodon/service_worker/entry.js
index 5955e9146..ce42271a9 100644
--- a/app/javascript/mastodon/service_worker/entry.js
+++ b/app/javascript/mastodon/service_worker/entry.js
@@ -1,4 +1,4 @@
-import { freeStorage } from '../storage/modifier';
+import { freeStorage, storageFreeable } from '../storage/modifier';
 import './web_push_notifications';
 
 function openSystemCache() {
@@ -49,7 +49,7 @@ self.addEventListener('fetch', function(event) {
 
       return response;
     }));
-  } else if (process.env.CDN_HOST ? url.host === process.env.CDN_HOST : url.pathname.startsWith('/system/')) {
+  } else if (storageFreeable && process.env.CDN_HOST ? url.host === process.env.CDN_HOST : url.pathname.startsWith('/system/')) {
     event.respondWith(openSystemCache().then(cache => {
       return cache.match(event.request.url).then(cached => {
         if (cached === undefined) {