Skip to content

Commit 9bdfd4d

Browse files
committed
Fixed ts generator
1 parent e7add3a commit 9bdfd4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript-generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function createRequest (type) {
142142

143143
function isBodyRequired () {
144144
for (const endpoint of endpoints) {
145-
if (endpoint.request.name === type.name.name) {
145+
if (endpoint.request && endpoint.request.name === type.name.name) {
146146
return endpoint.requestBodyRequired
147147
}
148148
}

0 commit comments

Comments
 (0)