Skip to content

Commit edc8e2e

Browse files
authored
fix: stricter checks on output object before accessing case
1 parent d3e2af6 commit edc8e2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export const operationToId = ({
6161
}): string => {
6262
let result: string;
6363

64-
const targetCase = context.config.output.case ?? 'camelCase';
64+
const { output } = context.config;
65+
const targetCase = (output !== void 0 && 'case' in output ? output.case : void 0) ?? 'camelCase';
66+
6567
if (
6668
id &&
6769
(!context.config.plugins['@hey-api/sdk'] ||

0 commit comments

Comments
 (0)