If the caller sets the fieldOptions property to null/undefined the FM
editor will throw a JS error (field.isRequired is not a function) and fail
to render properly. This adds a sanity check to the fieldOptions value.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
// Avoid fetching data on init since that may lead to unnecessary
// data retrieval.
ngOnInit() {
+
+ // In case the caller sets the value to null / undef.
+ if (!this.fieldOptions) { this.fieldOptions = {}; }
+
this.listifyInputs();
this.idlDef = this.idl.classes[this.idlClass];
this.recordLabel = this.idlDef.label;