We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5579ceb commit f818e64Copy full SHA for f818e64
packages/fetch-http-handler/src/stream-collector.ts
@@ -1,7 +1,7 @@
1
import { StreamCollector } from "@smithy/types";
2
3
//reference: https://snack.expo.io/r1JCSWRGU
4
-export const streamCollector: StreamCollector = (stream: Blob | ReadableStream): Promise<Uint8Array> => {
+export const streamCollector: StreamCollector = async (stream: Blob | ReadableStream): Promise<Uint8Array> => {
5
if (typeof Blob === "function" && stream instanceof Blob) {
6
return new Uint8Array(await stream.arrayBuffer());
7
}
@@ -24,4 +24,4 @@ async function collectStream(stream: ReadableStream): Promise<Uint8Array> {
24
isDone = done;
25
26
return res;
27
-}
+}
0 commit comments