Skip to content

Commit f604323

Browse files
authored
Merge pull request #2356 from seriouslag/patch/add-output-object-check
2 parents 9ccd969 + d49741b commit f604323

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/openapi-ts/src/openApi/shared/utils/operation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ export const operationToId = ({
3939

4040
const { output } = context.config;
4141
const targetCase =
42-
(output !== undefined && 'case' in output ? output.case : undefined) ??
43-
'camelCase';
42+
(output !== undefined && typeof output === 'object' && 'case' in output
43+
? output.case
44+
: undefined) ?? 'camelCase';
4445

4546
if (
4647
id &&

0 commit comments

Comments
 (0)