Permalink
Browse files

fix(progress): onProgress when currentRequests is zero (#118)

  • Loading branch information...
cawa-93 authored and pi0 committed Mar 7, 2018
1 parent 20f17aa commit a90236edd018a74e51f0ce330c108b935c01dcc4
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/plugin.template.js
@@ -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))
}

0 comments on commit a90236e

Please sign in to comment.