From: Mark Otto Date: Mon, 20 Mar 2023 00:35:57 +0000 (-0700) Subject: Revert "Guard more in color-modes.js (#38235)" (#38280) X-Git-Tag: v5.3.0-alpha2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6855ce9512d0cd0b4c54f720ac5b9a15c685e057;p=thirdparty%2Fbootstrap.git Revert "Guard more in color-modes.js (#38235)" (#38280) This reverts commit 474bf2aed1c03cf53e2d2c48b30c5e689dd9e6bc. --- 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 541fcc21b5..4528ba36b8 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')