Skip to content

Commit 6855ce9

Browse files
authored
Revert "Guard more in color-modes.js (#38235)" (#38280)
This reverts commit 474bf2a.
1 parent 2d0c94c commit 6855ce9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

site/static/docs/5.3/assets/js/color-modes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929

3030
const showActiveTheme = (theme, focus = false) => {
3131
const themeSwitcher = document.querySelector('#bd-theme')
32-
const themeSwitcherText = document.querySelector('#bd-theme-text')
3332

34-
if (!themeSwitcher || !themeSwitcherText) {
33+
if (!themeSwitcher) {
3534
return
3635
}
3736

37+
const themeSwitcherText = document.querySelector('#bd-theme-text')
3838
const activeThemeIcon = document.querySelector('.theme-icon-active use')
3939
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
4040
const svgOfActiveBtn = btnToActive.querySelector('svg use').getAttribute('href')

0 commit comments

Comments
 (0)