Skip to content

Commit

Permalink
fix: 修复operationObject.parameters可能为空导致报错 (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
rookie-luochao authored Jul 18, 2023
1 parent 4f31f97 commit 74835c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serviceGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ class ServiceGenerator {
if (!operationObject) {
return;
}
operationObject.parameters = operationObject.parameters.filter(
operationObject.parameters = operationObject.parameters?.filter(
(item) => (item as ParameterObject)?.in !== 'header',
);
const props = [];
Expand Down

0 comments on commit 74835c6

Please sign in to comment.