Skip to content

Commit

Permalink
fix: Make response undefined when status code is 204
Browse files Browse the repository at this point in the history
  • Loading branch information
ignassew committed Jul 3, 2024
1 parent e4f12f5 commit 89d589b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function transformToHandlerCode(operationCollection: OperationCollection)
const resultArray = [${op.response.map(response => {
const identifier = getResIdentifierName(response);
return parseInt(response?.code!) === 204
? `[null, { status: ${parseInt(response?.code!)} }]`
? `[undefined, { status: ${parseInt(response?.code!)} }]`
: `[${identifier ? `${identifier}()` : 'null'}, { status: ${parseInt(response?.code!)} }]`;
})}];
Expand Down

0 comments on commit 89d589b

Please sign in to comment.