From e50a115d6f89cf376fbc481663088c119e4b568a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 30 May 2024 10:07:58 -0700 Subject: [PATCH] composebox_typeahead: Fix TypeScript noUncheckedIndexedAccess errors. Signed-off-by: Anders Kaseorg --- web/src/composebox_typeahead.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/composebox_typeahead.ts b/web/src/composebox_typeahead.ts index 2398657f30..81d3bef50a 100644 --- a/web/src/composebox_typeahead.ts +++ b/web/src/composebox_typeahead.ts @@ -933,7 +933,7 @@ export function get_candidates( assert(tokens !== null); if (tokens[1]) { const stream_name = tokens[1]; - token = tokens[2] || ""; + token = tokens[2] ?? ""; // Don't autocomplete if there is a space following '>' if (token.startsWith(" ")) {