Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use response._bodyInit as fallback for react-native and qq #398

Merged
merged 11 commits into from
Oct 8, 2024
4 changes: 3 additions & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,9 @@ export function createFetch(globalOptions: CreateFetchOptions = {}): $Fetch {
}

const hasBody =
context.response.body &&
(context.response.body ||
// https://github.com/JakeChampion/fetch/issues/1454
(context.response as any)._bodyInit) &&
joshmossas marked this conversation as resolved.
Show resolved Hide resolved
!nullBodyResponses.has(context.response.status) &&
context.options.method !== "HEAD";
if (hasBody) {
Expand Down