Skip to content

Commit 345a7b2

Browse files
authored
fix: Issue #75
1 parent 7f67b2a commit 345a7b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/schema-inspector.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
this._custom = {};
8181
if (custom != null) {
8282
for (var key in custom) {
83-
if (custom.hasOwnProperty(key)){
83+
if (Object.prototype.hasOwnProperty.call(custom, key)) {
8484
this._custom['$' + key] = custom[key];
8585
}
8686
}
@@ -480,7 +480,7 @@
480480
}
481481
else {
482482
for (var key in candidate) {
483-
if (candidate.hasOwnProperty(key)){
483+
if (Object.prototype.hasOwnProperty.call(candidate, key)) {
484484
this._deeperArray(key);
485485
this._validate(items, candidate[key]);
486486
this._back();
@@ -1011,7 +1011,7 @@
10111011
}
10121012
else {
10131013
for (i in post) {
1014-
if(post.hasOwnProperty(i)){
1014+
if (Object.prototype.hasOwnProperty.call(post, i)) {
10151015
this._deeperArray(i);
10161016
post[i] = this._sanitize(schema.items, post[i]);
10171017
this._back();
@@ -1430,7 +1430,7 @@
14301430
var prop = schema.properties || {};
14311431

14321432
for (var key in prop) {
1433-
if (prop.hasOwnProperty(key)){
1433+
if (Object.prototype.hasOwnProperty.call(prop, key)) {
14341434
if (prop[key].optional === true && _rand.bool() === true) {
14351435
continue;
14361436
}

0 commit comments

Comments
 (0)