Skip to content

Commit

Permalink
fix: 兼容无类型注释
Browse files Browse the repository at this point in the history
  • Loading branch information
kongjing@dian.so authored and kongjing@dian.so committed Nov 7, 2022
1 parent be91552 commit ca4f8c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/api/src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function getApiTypeComments(codeStr: string) {
if (commentsMatch) {
const commentsStr = commentsMatch[0]
const comm: Record<string, any> = parseComments(commentsStr)
if (comm['type'].includes('swagger')) {
if (comm['type']?.includes('swagger')) {
comments = '/** @type from swagger */'
}
}
Expand Down

0 comments on commit ca4f8c8

Please sign in to comment.