Skip to content

Commit 7a180b9

Browse files
Zheyang Songfbessou
authored andcommitted
Fix Component Crash When Input Schema Is Invalid
+ Add logic to check existence of property `schema` before accessing `schema.type`
1 parent aca78a7 commit 7a180b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/form.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class FormComponent implements OnChanges {
7676
this.setActions();
7777
}
7878

79-
if (!this.schema.type) {
79+
if (this.schema && !this.schema.type) {
8080
this.schema.type = 'object';
8181
}
8282

0 commit comments

Comments
 (0)