Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/util/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export const downloadWithProgress = async (
cb?: ProgressCallback
): Promise<ArrayBuffer> => {
const resp = await fetch(url);
const fallback = resp.clone();
let buf;

try {
Expand Down Expand Up @@ -143,7 +144,7 @@ export const downloadWithProgress = async (
} catch (e) {
console.log(`failed to send download progress event: `, e);
// Fetch arrayBuffer directly when it is not possible to get progress.
buf = await resp.arrayBuffer();
buf = await fallback.arrayBuffer();
cb &&
cb({
url,
Expand Down
Loading