From 5d11b7cd4e02138717d20ef9478837229bbb421d Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 9 Jan 2025 12:18:54 -0500 Subject: [PATCH] chore: varnames --- R/precompiled.R | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/R/precompiled.R b/R/precompiled.R index 645216150..d02762445 100644 --- a/R/precompiled.R +++ b/R/precompiled.R @@ -7,13 +7,14 @@ # theme so we can compare with the user theme. We only use the precompiled theme # if the two are identical. Themes are cached after comparison. precompiled_bs_theme_hash <- function(version) { - theme <- get0(version, .precompiled_css_themes) + theme_hash <- get0(version, .precompiled_css_themes) + if (is.null(theme)) { - theme <- rlang::hash(bs_theme(version = version, brand = FALSE)) - assign(version, theme, envir = .precompiled_css_themes) + theme_hash <- rlang::hash(bs_theme(version = version, brand = FALSE)) + assign(version, theme_hash, envir = .precompiled_css_themes) } - return(theme) + return(theme_hash) } #' Get the path to a precompiled CSS file