Skip to content

Commit 4041ff7

Browse files
committed
fix: improve early return condition in parseResponseData function
1 parent dc6387c commit 4041ff7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/response-parser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export async function parseResponseData<
3333
>(
3434
response: FetchResponse<ResponseData, RequestBody, QueryParams, PathParams>,
3535
): Promise<any> {
36-
// Bail early for HEAD requests or status codes, or any requests that never have a body
37-
if (!response || !response.body) {
36+
// Bail early if response is null or undefined
37+
if (!response) {
3838
return null;
3939
}
4040

0 commit comments

Comments
 (0)