Skip to content

Commit 68e4a70

Browse files
committed
Bugfix: Don't trigger on empty schema
1 parent 108d22a commit 68e4a70

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/directives/schema-form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ function($compile, schemaForm, schemaFormDecorators){
7171
var schema = scope.schema;
7272
var form = scope.initialForm || ['*'];
7373

74-
if (form && schema && (lastDigest.form !== form || lastDigest.schema !== schema)) {
74+
//The check for schema.type is to ensure that schema is not {}
75+
if (form && schema && schema.type && (lastDigest.form !== form || lastDigest.schema !== schema)) {
7576
lastDigest.schema = schema;
7677
lastDigest.form = form;
7778

0 commit comments

Comments
 (0)