Skip to content

Commit

Permalink
FIX: Javascript incorrect check for variable (#1166)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored Feb 7, 2023
1 parent 7bea9f5 commit 34520e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function checkPageExistsAndRedirect(event) {

// Populate the version switcher from the JSON config file
var themeSwitchBtns = document.querySelectorAll("version-switcher__button");
if (themeSwitchBtns) {
if (themeSwitchBtns.length) {
fetch(DOCUMENTATION_OPTIONS.theme_switcher_json_url)
.then((res) => {
return res.json();
Expand Down

0 comments on commit 34520e5

Please sign in to comment.