From d2752d519be9ab6d25be83341cd85e1dc5b85d42 Mon Sep 17 00:00:00 2001 From: Aman Singh <121886615+aman-v-singh@users.noreply.github.com> Date: Fri, 30 Jun 2023 17:49:33 +0530 Subject: [PATCH] Check for typeof paths[path] to be object --- lib/schemaUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/schemaUtils.js b/lib/schemaUtils.js index 2abf65df..a7cc47bf 100644 --- a/lib/schemaUtils.js +++ b/lib/schemaUtils.js @@ -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