aboutsummaryrefslogtreecommitdiff
path: root/site/static
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2023-03-19 17:35:57 -0700
committerGitHub <[email protected]>2023-03-19 17:35:57 -0700
commit6855ce9512d0cd0b4c54f720ac5b9a15c685e057 (patch)
tree474fe503521acf45a378e0ea8e6a14be695dd339 /site/static
parent2d0c94c05a8d338b1644a49820747d0cf72621ad (diff)
downloadbootstrap-6855ce9512d0cd0b4c54f720ac5b9a15c685e057.tar.xz
bootstrap-6855ce9512d0cd0b4c54f720ac5b9a15c685e057.zip
Revert "Guard more in color-modes.js (#38235)" (#38280)
This reverts commit 474bf2aed1c03cf53e2d2c48b30c5e689dd9e6bc.
Diffstat (limited to 'site/static')
-rw-r--r--site/static/docs/5.3/assets/js/color-modes.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/site/static/docs/5.3/assets/js/color-modes.js b/site/static/docs/5.3/assets/js/color-modes.js
index 541fcc21b..4528ba36b 100644
--- a/site/static/docs/5.3/assets/js/color-modes.js
+++ b/site/static/docs/5.3/assets/js/color-modes.js
@@ -29,12 +29,12 @@
const showActiveTheme = (theme, focus = false) => {
const themeSwitcher = document.querySelector('#bd-theme')
- const themeSwitcherText = document.querySelector('#bd-theme-text')
- if (!themeSwitcher || !themeSwitcherText) {
+ if (!themeSwitcher) {
return
}
+ const themeSwitcherText = document.querySelector('#bd-theme-text')
const activeThemeIcon = document.querySelector('.theme-icon-active use')
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')