Skip to content

Commit 4e81d2d

Browse files
committed
Codacy (guard-for-in) fix
1 parent 892469e commit 4e81d2d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/index.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ const fieldComponents = require("./utils/fieldsLoader").default;
55
const abstractField = require("./fields/abstractField").default;
66
const install = (Vue, options) => {
77
Vue.component("VueFormGenerator", module.exports.component);
8-
if(options && options.validators) {
9-
for(let key in options.validators) {
10-
validators[key] = options.validators[key];
8+
if (options && options.validators) {
9+
for (let key in options.validators) {
10+
if ({}.hasOwnProperty.call(options.validators, key)) {
11+
validators[key] = options.validators[key];
12+
}
1113
}
1214
}
1315
};

0 commit comments

Comments
 (0)