diff --git a/src/frontend/src/contexts/flowsContext.tsx b/src/frontend/src/contexts/flowsContext.tsx index 51b4aee5b..e410d1365 100644 --- a/src/frontend/src/contexts/flowsContext.tsx +++ b/src/frontend/src/contexts/flowsContext.tsx @@ -334,11 +334,10 @@ export function FlowsProvider({ children }: { children: ReactNode }) { if (file) { let text = await file.text(); let fileData = JSON.parse(text); - if (fileData.is_component === undefined) { - reject("Your file doesn't have the is_component property."); - } else if ( - fileData.is_component !== undefined && - fileData.is_component !== isComponent + if ( + (fileData.is_component === undefined && isComponent === true) || + (fileData.is_component !== undefined && + fileData.is_component !== isComponent) ) { reject("You cannot upload a component as a flow or vice versa"); } else {