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 04ffc5e commit 36306bfCopy full SHA for 36306bf
src/index.ts
@@ -732,8 +732,8 @@ export default class DownloadQueue {
732
if (!this.active) {
733
task.pause();
734
}
735
- const percent = (bytesDownloaded / bytesTotal) * 100;
736
- this.handlers?.onProgress?.(url, percent, bytesDownloaded, bytesTotal);
+ const fraction = bytesDownloaded / bytesTotal;
+ this.handlers?.onProgress?.(url, fraction, bytesDownloaded, bytesTotal);
737
})
738
// eslint-disable-next-line @typescript-eslint/no-misused-promises
739
.done(async () => await this.doDone(url, task))
0 commit comments