dropdown_widget: Fix TypeScript noUncheckedIndexedAccess errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-30 10:07:59 -07:00
parent 7303851fd5
commit beef5d259b
1 changed files with 1 additions and 0 deletions

View File

@ -243,6 +243,7 @@ export class DropdownWidget {
function first_item(): JQuery {
const first_item = list_items[0];
assert(first_item !== undefined);
return $popper.find(`.list-item[data-unique-id="${first_item.unique_id}"]`);
}