From ab3110817f7c98dccbdc73ba961cc980d9cfab70 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 30 May 2024 10:07:59 -0700 Subject: [PATCH] narrow_banner: Fix TypeScript noUncheckedIndexedAccess errors. Signed-off-by: Anders Kaseorg --- web/src/narrow_banner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/narrow_banner.ts b/web/src/narrow_banner.ts index a5b43962f1..fca33ba2fc 100644 --- a/web/src/narrow_banner.ts +++ b/web/src/narrow_banner.ts @@ -292,7 +292,7 @@ function pick_empty_narrow_banner(): NarrowBannerData { }; } const user_ids = people.emails_strings_to_user_ids_array(first_operand); - assert(user_ids !== undefined); + assert(user_ids?.[0] !== undefined); if ( realm.realm_private_message_policy === settings_config.private_message_policy_values.disabled.code &&