Skip to content

Commit

Permalink
Merge pull request #18 from deco-cx/allow-refresh-button
Browse files Browse the repository at this point in the history
allow href
  • Loading branch information
tlgimenes authored Oct 6, 2023
2 parents b21f489 + 4447cf0 commit ec07a81
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runtime/entrypoints/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -981,7 +981,7 @@ document.addEventListener("click", async (e) => {

const partialUrl = new URL(
partial,
location.origin,
location.href,
);
await fetchPartials(partialUrl);
}
Expand Down Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ec07a81

Please sign in to comment.