Skip to content

Commit

Permalink
Fix slow file uploads causing the progress bar to jump backwards
Browse files Browse the repository at this point in the history
  • Loading branch information
reinink committed Oct 29, 2020
1 parent 34c66e8 commit b8643ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function start(delay) {

function progress(event) {
if (NProgress.isStarted() && event.detail.progress.percentage) {
NProgress.set(event.detail.progress.percentage / 100 * .9)
NProgress.set(Math.max(NProgress.status, event.detail.progress.percentage / 100 * 0.9))
}
}

Expand Down

0 comments on commit b8643ba

Please sign in to comment.