Skip to content

Commit

Permalink
add ref to #294
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 8, 2024
1 parent 5ab0b94 commit 8ae2973
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export function createFetch(globalOptions: CreateFetchOptions = {}): $Fetch {
const hasBody =
(context.response.body ||
// https://github.com/JakeChampion/fetch/issues/1454
// https://github.com/unjs/ofetch/issues/294
(context.response as any)._bodyInit) &&
!nullBodyResponses.has(context.response.status) &&
context.options.method !== "HEAD";
Expand All @@ -218,6 +219,7 @@ export function createFetch(globalOptions: CreateFetchOptions = {}): $Fetch {
context.response._data =
context.response.body ||
// https://github.com/JakeChampion/fetch/issues/1454
// https://github.com/unjs/ofetch/issues/294
(context.response as any)._bodyInit;
break;
}
Expand Down

0 comments on commit 8ae2973

Please sign in to comment.