Skip to content

Commit

Permalink
Fallback to default theme if none is detected (#678)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpsievert committed Jul 14, 2023
1 parent 5c74f4c commit 494923b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/utils-deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ component_dependency_sass_ <- function(theme, name) {

bs_dependency(
input = lapply(scss_files, sass_file),
theme = theme,
# At least currently, when statically rendering a component,
# bs_dependency_defer() passes along a NULL theme. We should
# eventually fix that, but for now, fall back to the default theme
theme = theme %||% bs_theme(),
name = paste0("bslib-", name, "-styles"),
version = get_package_version("bslib"),
cache_key_extra = get_package_version("bslib"),
Expand Down

0 comments on commit 494923b

Please sign in to comment.