bootstrap_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-30 10:07:58 -07:00
parent 9ad8ca4223
commit 8cec7dd917
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ export class Typeahead<ItemType extends string | object> {
let $next = $active.next(); let $next = $active.next();
if (!$next.length) { if (!$next.length) {
$next = $(this.$menu.find("li")[0]); $next = this.$menu.find("li").first();
} }
$next.addClass("active"); $next.addClass("active");