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
This commit is contained in:
parent
dec42bf447
commit
981081f3b7
1 changed files with 2 additions and 2 deletions
|
|
@ -100,7 +100,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element {
|
||||||
// Set flow tab id
|
// Set flow tab id
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const awaitgetTypes = async () => {
|
const awaitgetTypes = async () => {
|
||||||
if (flows && currentFlowId === "") {
|
if (flows && currentFlowId === "" && Object.keys(types).length > 0) {
|
||||||
const isAnExistingFlow = flows.find((flow) => flow.id === id);
|
const isAnExistingFlow = flows.find((flow) => flow.id === id);
|
||||||
|
|
||||||
if (!isAnExistingFlow) {
|
if (!isAnExistingFlow) {
|
||||||
|
|
@ -114,7 +114,7 @@ export default function FlowPage({ view }: { view?: boolean }): JSX.Element {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
awaitgetTypes();
|
awaitgetTypes();
|
||||||
}, [id, flows, currentFlowId]);
|
}, [id, flows, currentFlowId, types]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setOnFlowPage(true);
|
setOnFlowPage(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue