From d154820b2883c96cac24bd20333acb150d05fb4f Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Wed, 13 Dec 2023 09:35:48 +0100 Subject: [PATCH] Remove unnecessary double type check --- src/common/ShlinkWebComponentContainer.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 (