Skip to content

Commit 3307e50

Browse files
author
Ron Radtke
committed
Small fix for total download being 0
1 parent 8edbfc8 commit 3307e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public boolean handleMessage(Message msg) {
197197
cursor.close();
198198

199199
ReactNativeBlobUtilProgressConfig reportConfig = getReportProgress(taskId);
200-
float progress = (total != -1) ? written / total : 0;
200+
float progress = (total > 0) ? written / total : 0;
201201

202202
if (reportConfig != null && reportConfig.shouldReport(progress /* progress */)) {
203203
WritableMap args = Arguments.createMap();

0 commit comments

Comments
 (0)