@solidjs/router
Advanced tools
Comparing version 0.14.3 to 0.14.4
@@ -535,4 +535,3 @@ import { isServer, getRequestEvent, createComponent as createComponent$1, memo, delegateEvents, spread, mergeProps as mergeProps$1, template } from 'solid-js/web'; | ||
}; | ||
let s; | ||
const resolvedTo = resolve ? route.resolvePath(to) : resolvePath(queryOnly && (s = source().value) && s.split("?")[0] || "", to); | ||
const resolvedTo = resolve ? route.resolvePath(to) : resolvePath(queryOnly && location.pathname || "", to); | ||
if (resolvedTo === undefined) { | ||
@@ -1320,5 +1319,6 @@ throw new Error(`Path '${to}' is not a routable path`); | ||
const url = window.location.pathname.replace(/^\/+/, "/") + window.location.search; | ||
const state = window.history.state && window.history.state._depth && Object.keys(window.history.state).length === 1 ? undefined : window.history.state; | ||
return { | ||
value: url + window.location.hash, | ||
state: window.history.state | ||
state | ||
}; | ||
@@ -1325,0 +1325,0 @@ }; |
@@ -11,5 +11,6 @@ import { isServer } from "solid-js/web"; | ||
const url = window.location.pathname.replace(/^\/+/, "/") + window.location.search; | ||
const state = window.history.state && window.history.state._depth && Object.keys(window.history.state).length === 1 ? undefined : window.history.state; | ||
return { | ||
value: url + window.location.hash, | ||
state: window.history.state | ||
state | ||
}; | ||
@@ -16,0 +17,0 @@ }; |
@@ -308,3 +308,3 @@ import { runWithOwner, batch } from "solid-js"; | ||
? route.resolvePath(to) | ||
: resolvePath((queryOnly && (s = source().value) && s.split("?")[0]) || "", to); | ||
: resolvePath((queryOnly && location.pathname) || "", to); | ||
if (resolvedTo === undefined) { | ||
@@ -311,0 +311,0 @@ throw new Error(`Path '${to}' is not a routable path`); |
@@ -9,3 +9,3 @@ { | ||
"license": "MIT", | ||
"version": "0.14.3", | ||
"version": "0.14.4", | ||
"homepage": "https://github.com/solidjs/solid-router#readme", | ||
@@ -12,0 +12,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
172484
3841