Skip to content

Commit

Permalink
check for _bodyInit in "stream" responseType case
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmossas committed Oct 8, 2024
1 parent e11a6a0 commit 5ab0b94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ export function createFetch(globalOptions: CreateFetchOptions = {}): $Fetch {
break;
}
case "stream": {
context.response._data = context.response.body;
context.response._data =
context.response.body ||
// https://github.com/JakeChampion/fetch/issues/1454
(context.response as any)._bodyInit;
break;
}
default: {
Expand Down

0 comments on commit 5ab0b94

Please sign in to comment.