Fix error on some bad options

Would sometimes stop historylog from loading
This commit is contained in:
nathan 2022-12-06 10:05:47 -07:00
parent 57993741cb
commit 25f64d0064

View File

@ -233,6 +233,10 @@ export function cleanSelectOptions(options : SelectOption[] | string[] | object)
{ {
option = {label: option}; option = {label: option};
} }
else if(option === null)
{
option = {label: key + ""};
}
option.value = option.value??key.trim(); // link_search prefixes keys with one space option.value = option.value??key.trim(); // link_search prefixes keys with one space
fixed_options.push(option); fixed_options.push(option);
} }