From 71bdb216020af48436779d51bf8092cf8dc2d8c1 Mon Sep 17 00:00:00 2001 From: thislight Date: Mon, 23 Dec 2024 18:33:18 +0800 Subject: [PATCH] StackedRouter: fix duplicated '?' symbol --- src/platform/StackedRouter.tsx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/platform/StackedRouter.tsx b/src/platform/StackedRouter.tsx index c8f0417..df3d522 100644 --- a/src/platform/StackedRouter.tsx +++ b/src/platform/StackedRouter.tsx @@ -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 = (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", }); }