Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mighty-moments-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@builder.io/qwik-city': patch
---

fix: qwik-city spa routeStateInternal and routeLocation url origins mismatch
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ export const QwikCityProvider = component$<QwikCityProps>((props) => {
// which in the case of SSG may not match the actual origin the site
// is deployed on.
if (isBrowser && type === 'link' && routeInternal.value.type === 'initial') {
routeInternal.value.dest = new URL(window.location.href);
const url = new URL(window.location.href);
routeInternal.value.dest = url;
routeLocation.url = url;
}

const lastDest = routeInternal.value.dest;
Expand Down