feat: Use href instead of origin on Partial (#1870)

This commit is contained in:
Tiago Gimenes
2023-10-07 23:07:42 +02:00
committed by GitHub
parent 2bd3271883
commit 2df5921b59
4 changed files with 54 additions and 9 deletions
+3 -3
View File
@@ -948,7 +948,7 @@ document.addEventListener("click", async (e) => {
const partialUrl = new URL(
partial ? partial : nextUrl.href,
location.origin,
location.href,
);
await fetchPartials(partialUrl);
updateLinks(nextUrl);
@@ -979,7 +979,7 @@ document.addEventListener("click", async (e) => {
const partialUrl = new URL(
partial,
location.origin,
location.href,
);
await fetchPartials(partialUrl);
}
@@ -1042,7 +1042,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);
}
}