diff --git a/src/runtime/entrypoints/main.ts b/src/runtime/entrypoints/main.ts index 7cabb2e80f5..655607bc9f0 100644 --- a/src/runtime/entrypoints/main.ts +++ b/src/runtime/entrypoints/main.ts @@ -950,7 +950,7 @@ document.addEventListener("click", async (e) => { const partialUrl = new URL( partial ? partial : nextUrl.href, - location.origin, + location.href, ); await fetchPartials(partialUrl); updateLinks(nextUrl); @@ -981,7 +981,7 @@ document.addEventListener("click", async (e) => { const partialUrl = new URL( partial, - location.origin, + location.href, ); await fetchPartials(partialUrl); } @@ -1044,7 +1044,7 @@ document.addEventListener("submit", async (e) => { if (partial !== null) { e.preventDefault(); - const url = new URL(partial, location.origin); + const url = new URL(partial, location.href); await fetchPartials(url); } }