diff --git a/src/common/ShlinkWebComponentContainer.tsx b/src/common/ShlinkWebComponentContainer.tsx index 41a3047b..91e9a428 100644 --- a/src/common/ShlinkWebComponentContainer.tsx +++ b/src/common/ShlinkWebComponentContainer.tsx @@ -29,13 +29,12 @@ ShlinkWebComponentContainerDeps ShlinkWebComponent, ServerError, } = useDependencies(ShlinkWebComponentContainer); - const selectedServerIsReachable = isReachableServer(selectedServer); - const routesPrefix = selectedServerIsReachable ? `/server/${selectedServer.id}` : ''; - if (!selectedServerIsReachable) { + if (!isReachableServer(selectedServer)) { return ; } + const routesPrefix = `/server/${selectedServer.id}`; return (