Skip to content

Commit

Permalink
Check for typeof paths[path] to be object
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-v-singh committed Jun 30, 2023
1 parent 8d4d79d commit d2752d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/schemaUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ module.exports = {
Object.assign(specComponentsAndUtils, concreteUtils.getRequiredData(spec));

for (path in paths) {
if (paths.hasOwnProperty(path) && (paths[path] !== undefined || paths[path] !== null)) {
if (paths.hasOwnProperty(path) && typeof paths[path] === 'object') {
currentPathObject = paths[path];

// discard the leading slash, if it exists
Expand Down

0 comments on commit d2752d5

Please sign in to comment.