From 07c220f08bdf887f98f873cdb3226896cc019ec9 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 30 May 2024 10:08:00 -0700 Subject: [PATCH] typing_events: Fix TypeScript noUncheckedIndexedAccess errors. Signed-off-by: Anders Kaseorg --- web/src/typing_events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/typing_events.ts b/web/src/typing_events.ts index 8e2bb48170..16e7c6ccd0 100644 --- a/web/src/typing_events.ts +++ b/web/src/typing_events.ts @@ -64,7 +64,7 @@ function get_users_typing_for_narrow(): number[] { } const terms = narrow_state.search_terms(); - if (terms.length === 0) { + if (terms[0] === undefined) { return []; }