Skip to content

Commit

Permalink
fix: when total = NA and format contains :bar progress is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Fuco1 authored Oct 19, 2020
1 parent b146a6a commit c23ada8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/progress.R
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ pb_render <- function(self, private, tokens) {

ratio <- private$ratio()
complete_len <- round(bar_width * ratio)
if (is.na(complete_len)) { complete_len <- 0 }
complete <- paste(rep("", complete_len),
collapse = private$chars$complete)
current <- if (private$complete) {
Expand Down

0 comments on commit c23ada8

Please sign in to comment.