Skip to content

Commit

Permalink
fix: proxy progress 0 if no total
Browse files Browse the repository at this point in the history
  • Loading branch information
arildm committed Oct 23, 2024
1 parent 7d18292 commit 4a3aced
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/scripts/backend/base-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default abstract class BaseProxy<R extends {} = {}> {
this.total = _.reduce(tmp, (val1, val2) => val1 + val2, 0)
}

const stats = (this.progress / this.total!) * 100
const stats = this.total ? (this.progress / this.total) * 100 : 0

this.prev = e.target.responseText
return {
Expand Down

0 comments on commit 4a3aced

Please sign in to comment.