Skip to content

Commit 58bf985

Browse files
committed
refactor: streamline the schema variable
1 parent 51a682d commit 58bf985

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/openapi-ts/src/openApi/3.1.x/parser/pagination.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@ export const paginationField = ({
8585
(schema) => schema.type !== 'null',
8686
);
8787
if (nonNullCompositionSchemas.length === 1) {
88-
const firstSchema = nonNullCompositionSchemas[0]!;
89-
9088
const schemaTypes = getSchemaTypes({
91-
schema: firstSchema,
89+
schema: nonNullCompositionSchemas[0]!,
9290
});
9391
if (isPaginationType(schemaTypes)) {
9492
return name;

0 commit comments

Comments
 (0)