From 04c36f9d45c16ef310410f5fb0515f8bfa0dffa0 Mon Sep 17 00:00:00 2001 From: weeihan Date: Thu, 23 Jul 2026 22:34:20 +0800 Subject: [PATCH] fix(sw): remove dead pathname startsWith('/') guard after basePath drop --- public/sw.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/sw.js b/public/sw.js index c813a37..f8d8b8c 100644 --- a/public/sw.js +++ b/public/sw.js @@ -19,8 +19,7 @@ self.addEventListener('fetch', event => { // Only handle same-origin GET requests if ( event.request.method !== 'GET' || - url.origin !== self.location.origin || - !url.pathname.startsWith('/') + url.origin !== self.location.origin ) { return }