Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

bootstrap_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.

Anders Kaseorg8cec7dd9171b
diff --git a/web/src/bootstrap_typeahead.ts b/web/src/bootstrap_typeahead.ts
index 7c82f529730..f9692720eff 100644
--- a/web/src/bootstrap_typeahead.ts
+++ b/web/src/bootstrap_typeahead.ts
@@ -471,7 +471,7 @@ export class Typeahead<ItemType extends string | object> {
let $next = $active.next();
if (!$next.length) {
- $next = $(this.$menu.find("li")[0]);
+ $next = this.$menu.find("li").first();
}
$next.addClass("active");