We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3306a6 commit 7b14c4bCopy full SHA for 7b14c4b
src/lib/forms/widgets/custom_fields/ComposeFields.js
@@ -10,9 +10,10 @@ export class ComposeFields extends Component {
10
constructor(props) {
11
super(props);
12
const { composeSections, record } = props;
13
- const filled = Object.keys(record.custom_fields).map(
14
- (key) => `custom_fields.${key}`
15
- );
+ const filled =
+ record.custom_fields && typeof record.custom_fields === "object"
+ ? Object.keys(record.custom_fields).map((key) => `custom_fields.${key}`)
16
+ : [];
17
this.state = { sections: composeSections, tempFields: [], recordFields: filled };
18
this.fieldsCfg = this.getFieldsConfig(composeSections);
19
this.sectionsList = composeSections.map((section) => section.section);
0 commit comments