mirror of
https://github.com/twbs/bootstrap.git
synced 2024-11-29 11:24:18 +01:00
Fix console error in examples pages du to no theme switcher (#38074)
This commit is contained in:
parent
42e99cc59f
commit
31221272e0
@ -29,6 +29,11 @@
|
|||||||
|
|
||||||
const showActiveTheme = (theme, focus = false) => {
|
const showActiveTheme = (theme, focus = false) => {
|
||||||
const themeSwitcher = document.querySelector('#bd-theme')
|
const themeSwitcher = document.querySelector('#bd-theme')
|
||||||
|
|
||||||
|
if (!themeSwitcher) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const themeSwitcherText = document.querySelector('#bd-theme-text')
|
const themeSwitcherText = document.querySelector('#bd-theme-text')
|
||||||
const activeThemeIcon = document.querySelector('.theme-icon-active use')
|
const activeThemeIcon = document.querySelector('.theme-icon-active use')
|
||||||
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
|
const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`)
|
||||||
|
Loading…
Reference in New Issue
Block a user