Skip to content

Commit

Permalink
Merge branch 'next' into Support-article
Browse files Browse the repository at this point in the history
  • Loading branch information
gowtham-balaganesh authored Oct 25, 2024
2 parents cf63a30 + 5cab368 commit 10499d4
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,17 @@ export class FieldEditor {
} else {
try {
const strNewFieldLabel = strInputValue.toLowerCase();
const arrFields = this.formValues.fields;
let arrFields = this.formValues.fields;
// Check if any field has sections and concatenate fields from sections
arrFields = arrFields.reduce((acc, field) => {
if (
field?.field_options?.has_sections &&
Array.isArray(field?.fields)
) {
return acc.concat(field?.fields);
}
return acc.concat(field);
}, []);

if (
arrFields &&
Expand Down

0 comments on commit 10499d4

Please sign in to comment.