Skip to content

Commit

Permalink
fix: 🐛 Slice complete correctly for progress bar (by @ptbrowne)
Browse files Browse the repository at this point in the history
  • Loading branch information
CPatchane committed Jan 21, 2019
1 parent 0811ea2 commit 35662d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cozy-scripts/utils/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ ProgressBar.prototype.render = function(tokens, force) {
)

/* add head to the complete string */
if (completeLength > 0) complete = complete.slice(0, -1) + this.chars.head
if (completeLength > 0)
complete = complete.slice(0, -this.chars.complete.length) + this.chars.head

/* fill in the actual progress bar */
str = str.replace(':bar', complete + incomplete)
Expand Down

0 comments on commit 35662d8

Please sign in to comment.