Skip to content

Commit fb381d9

Browse files
fix: check for existence of response body, not ReadableStream impl
1 parent 4de99a2 commit fb381d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/fetch-http-handler/src/fetch-http-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ export class FetchHttpHandler implements HttpHandler {
7272
transformedHeaders[pair[0]] = pair[1];
7373
}
7474

75-
const hasResponseStream = typeof ReadableStream === "function";
75+
const hasReadableStream = response.body !== undefined;
7676

7777
// Return the response with buffered body
78-
if (!hasResponseStream) {
78+
if (!hasReadableStream) {
7979
return response.blob().then(body => ({
8080
response: new HttpResponse({
8181
headers: transformedHeaders,

0 commit comments

Comments
 (0)