diff --git a/src/browser/register.ts b/src/browser/register.ts index 60f054bc3..4f8345808 100644 --- a/src/browser/register.ts +++ b/src/browser/register.ts @@ -10,7 +10,7 @@ if ("serviceWorker" in navigator) { const path = normalize(`${options.csStaticBase}/dist/serviceWorker.js`) navigator.serviceWorker .register(path, { - scope: options.base || "/", + scope: (options.base ?? "") + "/", }) .then(() => { console.log("[Service Worker] registered")