Skip to content

Commit 1bec18e

Browse files
authored
Fix undefined request body when body === false or 0, "".
1 parent e180ba3 commit 1bec18e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/core/fetch/getRequestBody.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const getRequestBody = (options: ApiRequestOptions): any => {
2-
if (options.body) {
2+
if (options.body !== undefined) {
33
if (options.mediaType?.includes('/json')) {
44
return JSON.stringify(options.body)
55
} else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {

0 commit comments

Comments
 (0)