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 004f4e5 commit dee8f4cCopy full SHA for dee8f4c
packages/util/src/index.ts
@@ -106,6 +106,7 @@ export const downloadWithProgress = async (
106
cb?: ProgressCallback
107
): Promise<ArrayBuffer> => {
108
const resp = await fetch(url);
109
+ const fallback = resp.clone();
110
let buf;
111
112
try {
@@ -143,7 +144,7 @@ export const downloadWithProgress = async (
143
144
} catch (e) {
145
console.log(`failed to send download progress event: `, e);
146
// Fetch arrayBuffer directly when it is not possible to get progress.
- buf = await resp.arrayBuffer();
147
+ buf = await fallback.arrayBuffer();
148
cb &&
149
cb({
150
url,
0 commit comments