Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/js/brutusin-json-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ if (typeof brutusin === "undefined") {
if (s === null) {
s = SCHEMA_ANY;
}
if (s.$ref) {
if (s && s.$ref) {
s = getDefinition(s.$ref);
}
if (object instanceof Array) {
Expand All @@ -856,15 +856,15 @@ if (typeof brutusin === "undefined") {
continue;
}
var ss = null;
if (s.hasOwnProperty("properties") && s.properties.hasOwnProperty(prop)) {
if (s && s.hasOwnProperty("properties") && s.properties.hasOwnProperty(prop)) {
ss = s.properties[prop];
}
if (ss === null && s.hasOwnProperty("additionalProperties")) {
if (ss === null && s && s.hasOwnProperty("additionalProperties")) {
if (typeof s.additionalProperties === 'object') {
ss = s.additionalProperties;
}
}
if (ss === null && s.hasOwnProperty("patternProperties")) {
if (ss === null && s && s.hasOwnProperty("patternProperties")) {
for (var p in s.patternProperties) {
var r = RegExp(p);
if (prop.search(r) !== -1) {
Expand All @@ -879,7 +879,7 @@ if (typeof brutusin === "undefined") {
nonEmpty = true;
}
}
if (nonEmpty || s.required) {
if (nonEmpty || s && s.required) {
return clone;
} else {
return null;
Expand Down Expand Up @@ -1346,7 +1346,7 @@ if (typeof brutusin === "undefined") {
BrutusinForms.onResolutionFinished(source);
};
BrutusinForms.onResolutionStarted(source);
obj.schemaResolver(arr, obj.getData(), cb);
obj.schemaResolver(arr, obj.getData(), cb, source);


}
Expand Down