Skip to content

Commit 5402578

Browse files
Merge pull request #144 from msbtrifork/master
Check if formValuesInput is defined
2 parents 3e200d1 + 0844053 commit 5402578

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/lib/src/json-schema-form.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,11 @@ export class JsonSchemaFormComponent implements ControlValueAccessor, OnChanges,
694694
this.onChanges.emit(this.objectWrap ? data['1'] : data)
695695
);
696696
if (this.formValuesInput && this.formValuesInput.indexOf('.') === -1) {
697-
this.jsf.dataChanges.subscribe(data =>
698-
this[`${this.formValuesInput}Change`].emit(this.objectWrap ? data['1'] : data)
699-
);
697+
this.jsf.dataChanges.subscribe(data => {
698+
if (this.formValuesInput) {
699+
this[`${this.formValuesInput}Change`].emit(this.objectWrap ? data['1'] : data)
700+
}
701+
});
700702
}
701703

702704
// Trigger change detection on statusChanges to show updated errors

0 commit comments

Comments
 (0)