StackedRouter: fix duplicated '?' symbol
All checks were successful
/ depoly (push) Successful in 1m28s

This commit is contained in:
thislight 2024-12-23 18:33:18 +08:00
parent 771de51228
commit 71bdb21602
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -1,5 +1,4 @@
import {
Router,
type RouterProps,
type StaticRouterProps,
createRouter,
@ -16,9 +15,6 @@ import {
useContext,
onCleanup,
type Accessor,
children,
createSignal,
createRoot,
} from "solid-js";
import { createStore, unwrap } from "solid-js/store";
import "./StackedRouter.css";
@ -578,11 +574,11 @@ const StackedRouter: Component<StackedRouterProps> = (oprops) => {
createRenderEffect(() =>
untrack(() => {
if (stack.length === 0) {
const parts = [window.location.pathname] as string[]
const parts = [window.location.pathname] as string[];
if (window.location.search) {
parts.push("?", window.location.search)
parts.push(window.location.search);
}
pushFrame(parts.join(''), {
pushFrame(parts.join(""), {
replace: "all",
});
}