handle value missing

This commit is contained in:
pythongosssss 2023-08-05 11:04:04 +01:00
parent 32e115b818
commit b948b2cf41
1 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,9 @@ const ext = {
?.value;
let selectedIndex = clickedComboValue ? values.findIndex(v => v === clickedComboValue) : 0;
if (selectedIndex < 0) {
selectedIndex = 0;
}
let selectedItem = displayedItems[selectedIndex];
updateSelected();