From 283dc3d05b7ada9ad0b521ad0f92b291f62b24d5 Mon Sep 17 00:00:00 2001 From: sayomaki Date: Sat, 18 Nov 2023 10:14:47 +0800 Subject: [PATCH] Fix regression to deployments without backend (#2715) --- src/commons/application/ApplicationWrapper.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commons/application/ApplicationWrapper.tsx b/src/commons/application/ApplicationWrapper.tsx index 1c1bb2a04a..67dcf2aee2 100644 --- a/src/commons/application/ApplicationWrapper.tsx +++ b/src/commons/application/ApplicationWrapper.tsx @@ -26,7 +26,9 @@ const ApplicationWrapper: React.FC = () => { const [isApiHealthy, setIsApiHealthy] = useState(true); useEffect(() => { - getHealth().then(res => setIsApiHealthy(!!res)); + if (Constants.useBackend) { + getHealth().then(res => setIsApiHealthy(!!res)); + } }, []); const router = useMemo(() => {