mirror of https://github.com/sundowndev/http.git
fix(progress): onProgress when currentRequests is zero (#118)
parent
20f17aa031
commit
a90236edd0
|
@ -136,6 +136,9 @@ const setupProgress = (axios, ctx) => {
|
|||
})
|
||||
|
||||
const onProgress = e => {
|
||||
if (!currentRequests) {
|
||||
return
|
||||
}
|
||||
const progress = ((e.loaded * 100) / (e.total * currentRequests))
|
||||
$loading().set(Math.min(100, progress))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue