Skip to content

Commit

Permalink
parseCssColors(): treat incoming NAs as an invalid color specificatio…
Browse files Browse the repository at this point in the history
…n (instead of throwing with an unintelligible error. Closes #161
  • Loading branch information
cpsievert committed Dec 2, 2020
1 parent 636b95e commit 2f52a8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/colors.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#' @md
#' @export
parseCssColors <- function(str, mustWork = TRUE) {
# Logic below assumes
str[is.na(str)] <- ""

# Strip insignificant whitespace
str <- color_strip_ws(str)

Expand Down

0 comments on commit 2f52a8e

Please sign in to comment.