From 1bec18e66435b40430712e2f401d61a205f832f8 Mon Sep 17 00:00:00 2001 From: visortelle Date: Mon, 13 Jun 2022 14:06:08 +0300 Subject: [PATCH] Fix undefined request body when body === false or 0, "". --- src/templates/core/fetch/getRequestBody.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/core/fetch/getRequestBody.hbs b/src/templates/core/fetch/getRequestBody.hbs index 8af9c422..b2fc7e21 100644 --- a/src/templates/core/fetch/getRequestBody.hbs +++ b/src/templates/core/fetch/getRequestBody.hbs @@ -1,5 +1,5 @@ const getRequestBody = (options: ApiRequestOptions): any => { - if (options.body) { + if (options.body !== undefined) { if (options.mediaType?.includes('/json')) { return JSON.stringify(options.body) } else if (isString(options.body) || isBlob(options.body) || isFormData(options.body)) {