Safe access schema property

This commit is contained in:
Jibin Mathews
2020-03-03 20:16:33 +05:30
parent 4cc64094f3
commit b6c686f325

View File

@@ -2036,10 +2036,11 @@ module.exports = {
}
setTimeout(() => {
if (!schemaPathVar.schema) {
if (!(schemaPathVar && schemaPathVar.schema)) {
// no errors to show if there's no schema present in the spec
return cb(null, []);
}
this.checkValueAgainstSchema(mismatchProperty,
transactionPathPrefix,
pathVar.key,