Skip to content

Commit

Permalink
Update fetch.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 8, 2024
1 parent 5dc0ba0 commit e11a6a0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ export function createFetch(globalOptions: CreateFetchOptions = {}): $Fetch {

const hasBody =
(context.response.body ||
// React Native whatwg-fetch check. Can be removed when the following occurs
// 1) https://github.com/JakeChampion/fetch/issues/1454 is fixed
// 2) React Native upgrades to the whatwg-fetch version that has this fix
// https://github.com/JakeChampion/fetch/issues/1454
(context.response as any)._bodyInit) &&
!nullBodyResponses.has(context.response.status) &&
context.options.method !== "HEAD";
Expand Down

0 comments on commit e11a6a0

Please sign in to comment.