Skip to content

Commit a90236e

Browse files
cawa-93pi0
authored andcommitted
fix(progress): onProgress when currentRequests is zero (#118)
1 parent 20f17aa commit a90236e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/plugin.template.js

+3
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ const setupProgress = (axios, ctx) => {
136136
})
137137

138138
const onProgress = e => {
139+
if (!currentRequests) {
140+
return
141+
}
139142
const progress = ((e.loaded * 100) / (e.total * currentRequests))
140143
$loading().set(Math.min(100, progress))
141144
}

0 commit comments

Comments
 (0)