Skip to content

Commit

Permalink
Fix undefined dereference.
Browse files Browse the repository at this point in the history
  • Loading branch information
bfabio committed Aug 20, 2020
1 parent f02bb42 commit da095bf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/components/editorForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ const EditForm = props => {
} else {
params.activeKey = activeSection == 0 ? "0" : "";
}

let sectionsWithErrors = [];
//submitFailed &&

if (submitFailed && errors) {
sectionsWithErrors = Object.keys(errors).reduce((s, e) => {
let field = getFieldByTitle(allFields, e);
if (s.indexOf(field.section) < 0) {
if (field && s.indexOf(field.section) < 0) {
s.push(field.section);
}
return s;
Expand Down

0 comments on commit da095bf

Please # to comment.