From 2dda151a495787fa01d17a91556ee9fd0e179cf4 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Tue, 28 Jun 2022 02:21:12 +0200 Subject: [PATCH] fix: correct route for console (#4178) fixes #4177 --- resources/scripts/routers/ServerRouter.tsx | 3 +++ 1 file changed, 3 insertions(+) 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(/^\/+/, '')}`; };