Skip to content

Commit 513b50d

Browse files
committed
fix:修复fetch().progress(callback)方法会一直调用callback()问题
1 parent dacacd1 commit 513b50d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

harmony/blobUtil/src/main/ets/ReactNativeBlobUtil/ReactNativeBlobUtilReq.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ export default class ReactNativeBlobUtilReq {
326326
this.sendDownloadProgress();
327327
}
328328
if (count === -1) {
329+
if (this.downloadTimer) {
330+
clearInterval(this.downloadTimer);
331+
}
329332
this.downloadTimer = setInterval(() => {
330333
if (!this.downloadInfo?.totalSize) return;
331334
this.sendDownloadProgress();

0 commit comments

Comments
 (0)