guard against nullable x-circular-ref

This commit is contained in:
brunomartinspro 2022-09-27 14:42:20 +01:00
parent 68f2fa2827
commit 888721dd7c

View File

@ -171,7 +171,7 @@ export class OpenAPIParser {
$ref: string | undefined,
refsStack: string[],
): MergedOpenAPISchema {
if (schema['x-circular-ref']) {
if (schema?.hasOwnProperty('x-circular-ref')) {
return schema;
}