Skip to content

Commit 28e0f1d

Browse files
author
Vishal Shingala
committed
Replaced Object.hasOwnProperty usages with loadsh _.has for safe access
1 parent 4b82a66 commit 28e0f1d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/31XUtils/schemaUtils31X.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,14 @@ module.exports = {
153153
addOuterPropsToRefSchemaIfIsSupported(refSchema, outerProps) {
154154
const resolvedSchema = _.cloneDeep(refSchema),
155155
outerKeys = Object.keys(outerProps);
156-
outerKeys.forEach((key) => {
157-
if (_.isObject(resolvedSchema) && _.isObject(outerProps)) {
156+
157+
if (_.isObject(resolvedSchema) && _.isObject(outerProps)) {
158+
outerKeys.forEach((key) => {
158159
resolvedSchema[key] = (resolvedSchema[key] && Array.isArray(resolvedSchema[key])) ?
159160
[...new Set([...resolvedSchema[key], ...outerProps[key]])] :
160161
outerProps[key];
161-
}
162-
});
162+
});
163+
}
163164
return resolvedSchema;
164165
}
165166
};

0 commit comments

Comments
 (0)