Skip to content

Commit

Permalink
fix: Issue #75
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Jan 20, 2020
1 parent 7f67b2a commit 345a7b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/schema-inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
this._custom = {};
if (custom != null) {
for (var key in custom) {
if (custom.hasOwnProperty(key)){
if (Object.prototype.hasOwnProperty.call(custom, key)) {
this._custom['$' + key] = custom[key];
}
}
Expand Down Expand Up @@ -480,7 +480,7 @@
}
else {
for (var key in candidate) {
if (candidate.hasOwnProperty(key)){
if (Object.prototype.hasOwnProperty.call(candidate, key)) {
this._deeperArray(key);
this._validate(items, candidate[key]);
this._back();
Expand Down Expand Up @@ -1011,7 +1011,7 @@
}
else {
for (i in post) {
if(post.hasOwnProperty(i)){
if (Object.prototype.hasOwnProperty.call(post, i)) {
this._deeperArray(i);
post[i] = this._sanitize(schema.items, post[i]);
this._back();
Expand Down Expand Up @@ -1430,7 +1430,7 @@
var prop = schema.properties || {};

for (var key in prop) {
if (prop.hasOwnProperty(key)){
if (Object.prototype.hasOwnProperty.call(prop, key)) {
if (prop[key].optional === true && _rand.bool() === true) {
continue;
}
Expand Down

0 comments on commit 345a7b2

Please sign in to comment.