1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

fix: correct route for console (#4178)

fixes #4177
This commit is contained in:
Boy132 2022-06-28 02:21:12 +02:00 committed by GitHub
parent 7886251cd8
commit 2dda151a49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(/^\/+/, '')}`;
};