Skip to content

Commit 8528ff2

Browse files
make sure all schemas are unreferenced
1 parent 5e8b5dc commit 8528ff2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/middlewares/parsers/schema.preprocessor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class SchemaPreprocessor<
217217
state: VisitorState,
218218
) => {
219219
try {
220-
if (node.object === undefined || seenObjects.has(node.object)) {
220+
if (node.object === undefined) {
221221
return;
222222
}
223223

@@ -244,6 +244,8 @@ export class SchemaPreprocessor<
244244
return traverse(parent, node as VisitorNode<NodeType>, state);
245245
}
246246

247+
if (seenObjects.has(node.object)) return;
248+
247249
seenObjects.add(node.object);
248250

249251
this.visitNode(parent, node, state);

0 commit comments

Comments
 (0)