diff options
| author | Julien Déramond <[email protected]> | 2023-02-17 07:56:30 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-02-17 08:56:30 +0200 |
| commit | 31221272e0bbea1e436699cd5d68f705f37d3361 (patch) | |
| tree | 2f7526ba789cdb76f870d7c90fbe3bbefd099277 | |
| parent | 42e99cc59f6e87795e25d751bcfaf3be711191b4 (diff) | |
| download | bootstrap-31221272e0bbea1e436699cd5d68f705f37d3361.tar.xz bootstrap-31221272e0bbea1e436699cd5d68f705f37d3361.zip | |
Fix console error in examples pages du to no theme switcher (#38074)
| -rw-r--r-- | site/static/docs/5.3/assets/js/color-modes.js | 5 |
1 files changed, 5 insertions, 0 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 68717f82d..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,6 +29,11 @@ const showActiveTheme = (theme, focus = false) => { const themeSwitcher = document.querySelector('#bd-theme') + + 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}"]`) |
