mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-08-27 02:56:47 -05:00
Fix locale dropdown defaulting to blank on some locales (for real hopefully this time)
Co-Authored-By: mrjvs <mistrjvs@gmail.com>
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
function setDefaultDropdownLocale(localeString) {
|
||||
const selected = document.querySelector(".selected-locale");
|
||||
selected.innerHTML = document.querySelector(`label[for=${localeString}`).innerHTML
|
||||
let item = document.querySelector(`label[for=${localeString}`);
|
||||
if (!item) { // if locale cant be find, default to en-US
|
||||
localeString = "en-US";
|
||||
item = document.querySelector(`label[for=${localeString}`);
|
||||
}
|
||||
selected.innerHTML = item.innerHTML
|
||||
}
|
||||
|
||||
function localeDropdownHandler(selectedLocale) {
|
||||
|
||||
Reference in New Issue
Block a user