Skip to content

Commit f0d7450

Browse files
authored
fix(dropdown): fetch js error on non existing letter selections
When a dropdown is open, if you type a letter to match a label in the dropdown, an error occurs. Note that you have to type a letter to match a label in the dropdown. If there isn't an entry starting with the letter given, no error will occur.
1 parent 45d16a0 commit f0d7450

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/definitions/modules/dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,7 @@
26772677
module.set.scrollPosition($nextValue);
26782678
$selectedItem.removeClass(className.selected);
26792679
$nextValue.addClass(className.selected);
2680-
if (settings.selectOnKeydown && module.is.single() && !$nextItem.hasClass(className.actionable)) {
2680+
if (settings.selectOnKeydown && module.is.single() && (!$nextItem || !$nextItem.hasClass(className.actionable))) {
26812681
module.set.selectedItem($nextValue);
26822682
}
26832683
}

0 commit comments

Comments
 (0)