Skip to content

Commit

Permalink
Fix display of empty options
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed Dec 3, 2018
1 parent 7bf3d73 commit bd77f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/static_paths.R
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ print.staticPathOptions <- function(x, ...) {
format.staticPathOptions <- function(x, ...) {
paste0(
"<staticPathOptions>\n",
format_opts(x)
format_opts(x, format_empty = "<none>")
)
}

format_opts <- function(x) {
format_opts <- function(x, format_empty = "<inherit>") {
format_option <- function(opt) {
if (is.null(opt) || length(opt) == 0) {
"<none>"
format_empty

} else if (!is.null(names(opt))) {
# Named character vector
Expand Down

0 comments on commit bd77f36

Please sign in to comment.