diff --git a/client/web/src/components/login-toggle.tsx b/client/web/src/components/login-toggle.tsx index a1dbd3c95..08386d20e 100644 --- a/client/web/src/components/login-toggle.tsx +++ b/client/web/src/components/login-toggle.tsx @@ -106,9 +106,11 @@ function LoginPopoverContent({ } setIsRunningCheck(true) fetch(`http://${node.IPv4}:5252/ok`, { mode: "no-cors" }) - .then(() => { + .then((r) => { + if (r.ok) { + setCanConnectOverTS(true) + } setIsRunningCheck(false) - setCanConnectOverTS(true) }) .catch(() => setIsRunningCheck(false)) }, [auth.viewerIdentity, isRunningCheck, node.IPv4])