diff --git a/resources/scripts/routers/ServerRouter.tsx b/resources/scripts/routers/ServerRouter.tsx index 6bb566c31..2976cf789 100644 --- a/resources/scripts/routers/ServerRouter.tsx +++ b/resources/scripts/routers/ServerRouter.tsx @@ -36,6 +36,9 @@ export default () => { const clearServerState = ServerContext.useStoreActions((actions) => actions.clearServerState); const to = (value: string, url = false) => { + if (value === '/') { + return url ? match.url : match.path; + } return `${(url ? match.url : match.path).replace(/\/*$/, '')}/${value.replace(/^\/+/, '')}`; };