Changed non existent isComponent to be considered as flow
This commit is contained in:
parent
ca662c3937
commit
71510a21f8
1 changed files with 4 additions and 5 deletions
|
|
@ -334,11 +334,10 @@ export function FlowsProvider({ children }: { children: ReactNode }) {
|
||||||
if (file) {
|
if (file) {
|
||||||
let text = await file.text();
|
let text = await file.text();
|
||||||
let fileData = JSON.parse(text);
|
let fileData = JSON.parse(text);
|
||||||
if (fileData.is_component === undefined) {
|
if (
|
||||||
reject("Your file doesn't have the is_component property.");
|
(fileData.is_component === undefined && isComponent === true) ||
|
||||||
} else if (
|
(fileData.is_component !== undefined &&
|
||||||
fileData.is_component !== undefined &&
|
fileData.is_component !== isComponent)
|
||||||
fileData.is_component !== isComponent
|
|
||||||
) {
|
) {
|
||||||
reject("You cannot upload a component as a flow or vice versa");
|
reject("You cannot upload a component as a flow or vice versa");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue