Skip to content

Commit bdd7725

Browse files
author
Fransis Young
committed
chore(client-fetch,client-nuxt): updates getValidRequestBody to return undefined by default
1 parent 65c8763 commit bdd7725

File tree

2 files changed

+4
-2
lines changed
  • packages/openapi-ts/src/plugins/@hey-api

2 files changed

+4
-2
lines changed

packages/openapi-ts/src/plugins/@hey-api/client-fetch/bundle/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ export const createClient = (config: Config = {}): Client => {
226226
return options.body;
227227
}
228228

229-
return null;
229+
// no body was provided
230+
return undefined;
230231
}
231232

232233
const makeMethodFn =

packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/client.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ export const createClient = (config: Config = {}): Client => {
214214
return options.body;
215215
}
216216

217-
return null;
217+
// no body was provided
218+
return undefined;
218219
}
219220

220221
const makeMethodFn =

0 commit comments

Comments
 (0)