diff --git a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx index e2fd131d5109..ce67bf637a61 100644 --- a/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx +++ b/app/client/src/pages/Editor/QueryEditor/EditorJSONtoForm.tsx @@ -551,23 +551,25 @@ export function EditorJSONtoForm(props: Props) { if (!allowToRender) return null; } - if (formControlOrSection.hasOwnProperty("children")) { + // If component is type section, render it's children + if ( + formControlOrSection.hasOwnProperty("controlType") && + formControlOrSection.controlType === "SECTION" && + formControlOrSection.hasOwnProperty("children") + ) { return renderEachConfigV2(formName)(formControlOrSection); - } else { - try { - const { configProperty } = formControlOrSection; - return ( - - - - ); - } catch (e) { - log.error(e); - } } + try { + const { configProperty } = formControlOrSection; + return ( + + + + ); + } catch (e) { + log.error(e); + } + return null; }, );