mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-11-28 18:11:07 +02:00
Fix language selector on unpublished languages (#695)
The Danish translation is not yet linked in the language selector since it is very incomplete. This means that `selectedLang` is `null` in this case and thus we should not call any methods on it.
This commit is contained in:
parent
7739b4925a
commit
66247b698e
@ -172,7 +172,9 @@
|
||||
langList.style.display = langList.style.display == "block" ? "none" : "block";
|
||||
});
|
||||
let selectedLang = document.getElementById("{{ language }}");
|
||||
selectedLang.parentNode.classList.add("theme-selected");
|
||||
if (selectedLang) {
|
||||
selectedLang.parentNode.classList.add("theme-selected");
|
||||
}
|
||||
|
||||
// The path to the root, taking the current
|
||||
// language into account.
|
||||
|
Loading…
Reference in New Issue
Block a user