Always clamp XHR progress

This commit is contained in:
Thomas Weber committed 2021-07-21 18:27:47 -05:00
1 parent 1523292be9
commit 1733db8169
1 file changed
+1 -1
+1 -1
View File
@@ -21,7 +21,7 @@ const xhr = ({
if (progressCallback) {
xhr.onprogress = (e) => {
if (e.lengthComputable) {
progressCallback(e.loaded / e.total);
progressCallback(clampProgress(e.loaded / e.total));
} else if (estimatedSize) {
progressCallback(clampProgress(e.loaded / estimatedSize));
}