修复issue #1247: 使用反向代理有子路径时,serviceWorker的scope错误

This commit is contained in:
awnlzw 2024-04-21 10:25:23 +08:00
parent 705c979557
commit bd0e7a52ad
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ new Promise((resolve) => {
"serviceWorker" in navigator
) {
let scope =
window.location.protocol + "//" + window.location.host + "/";
window.location.protocol + "//" + window.location.host + window.location.pathname;
navigator.serviceWorker
.getRegistrations()
.then(async (registrations) => {