We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8757e3 commit 6aa38f1Copy full SHA for 6aa38f1
packages/solid-router/src/Transitioner.tsx
@@ -54,6 +54,16 @@ export function Transitioner() {
54
const nextPublicHref = trimPathRight(nextLocation.publicHref)
55
56
if (latestPublicHref !== nextPublicHref) {
57
+ const latestOrigin = new URL(router.latestLocation.url).origin
58
+ const nextOrigin = new URL(nextLocation.url).origin
59
+
60
+ if (latestOrigin !== nextOrigin) {
61
+ if (typeof window !== 'undefined') {
62
+ window.location.href = nextLocation.url
63
+ }
64
+ return
65
66
67
router.commitLocation({ ...nextLocation, replace: true })
68
}
69
0 commit comments