From 981081f3b7c7daa0a261a335599b2272ef175387 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62335616+lucaseduoli@users.noreply.github.com> Date: Tue, 20 May 2025 18:38:21 -0300 Subject: [PATCH] fix: updated flow pages to just set the flow if types are fetched (#8141) Updated flow pages to just upload flows if types are fetched --- src/frontend/src/pages/FlowPage/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/pages/FlowPage/index.tsx b/src/frontend/src/pages/FlowPage/index.tsx index 87de565e7..29b86f1d0 100644 --- a/src/frontend/src/pages/FlowPage/index.tsx +++ b/src/frontend/src/pages/FlowPage/index.tsx @@ -100,7 +100,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element { // Set flow tab id useEffect(() => { const awaitgetTypes = async () => { - if (flows && currentFlowId === "") { + if (flows && currentFlowId === "" && Object.keys(types).length > 0) { const isAnExistingFlow = flows.find((flow) => flow.id === id); if (!isAnExistingFlow) { @@ -114,7 +114,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element { } }; awaitgetTypes(); - }, [id, flows, currentFlowId]); + }, [id, flows, currentFlowId, types]); useEffect(() => { setOnFlowPage(true);