Skip to content

Commit

Permalink
Close #3299: bootstrapLib() should always call setCurrentTheme() when…
Browse files Browse the repository at this point in the history
… shiny is running (#3300)
  • Loading branch information
cpsievert authored Mar 26, 2021
1 parent 5c919ae commit 268c9af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/bootstrap.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ getLang <- function(ui) {
#' @export
bootstrapLib <- function(theme = NULL) {
tagFunction(function() {
if (isRunning()) {
setCurrentTheme(theme)
}

# If we're not compiling Bootstrap Sass (from bslib), return the
# static Bootstrap build.
if (!is_bs_theme(theme)) {
Expand All @@ -112,7 +116,6 @@ bootstrapLib <- function(theme = NULL) {
# Note also that since this is shinyOptions() (and not options()), the
# option is automatically reset when the app (or session) exits
if (isRunning()) {
setCurrentTheme(theme)
registerThemeDependency(bs_theme_deps)

} else {
Expand Down

0 comments on commit 268c9af

Please sign in to comment.