Add safe check avoid undef error

This commit is contained in:
umeshp7
2020-04-16 15:02:23 +05:30
parent 28932e10d6
commit f11caa54c8

View File

@@ -188,7 +188,7 @@ module.exports = {
let refResolvedSchema = this.resolveRefs(resolvedSchema, parameterSourceOption,
components, schemaResolutionCache, resolveFor, stack, _.cloneDeep(seenRef));
if (refResolvedSchema.value !== ERR_TOO_MANY_LEVELS) {
if (refResolvedSchema && refResolvedSchema.value !== ERR_TOO_MANY_LEVELS) {
schemaResolutionCache[refKey] = refResolvedSchema;
}