]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Revert "Guard more in color-modes.js (#38235)" (#38280)
authorMark Otto <markd.otto@gmail.com>
Mon, 20 Mar 2023 00:35:57 +0000 (17:35 -0700)
committerGitHub <noreply@github.com>
Mon, 20 Mar 2023 00:35:57 +0000 (17:35 -0700)
This reverts commit 474bf2aed1c03cf53e2d2c48b30c5e689dd9e6bc.

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

index 541fcc21b537fa5a79294522ced598dc62122b74..4528ba36b846ef68ee4b6af8460064b9f286f78a 100644 (file)
 
   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')