Skip to content

Commit

Permalink
bs_themer() fixed to prevent NULL values from crashing themer, fix … (
Browse files Browse the repository at this point in the history
#1112)

* `bs_themer()` fixed to prevent NULL values from crashing themer, fix #1111.

---------

Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
  • Loading branch information
meztez and gadenbuie authored Sep 10, 2024
1 parent 5420b24 commit 7ff88a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* `navset_card_pills()`, `navset_card_underline()`, `navset_card_tabs()` fixed to now respect header/footer arguments (@tanho63, #1024)

* Fixed a bug in `bs_themer()` (and `bs_theme_preview()`) that caused it to stop applying changes if a Sass variable was `NULL`. (@meztez, #1112)

# bslib 0.8.0

## Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion R/bs-theme-preview.R
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ bs_themer <- function(gfonts = TRUE, gfonts_update = FALSE) {
# Validate that `vals` is a simple list, containing atomic elements,
# that are all named
if (!identical(class(vals), "list") ||
!all(vapply(vals, is.atomic, logical(1))) ||
!all(vapply(vals, function(x) {is.atomic(x) || is.null(x)}, logical(1))) ||
is.null(names(vals)) ||
!isTRUE(all(nzchar(names(vals), keepNA = TRUE)))) {
warning(call. = FALSE,
Expand Down

0 comments on commit 7ff88a1

Please sign in to comment.