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.

typing_events: Fix TypeScript noUncheckedIndexedAccess errors.

Anders Kaseorg07c220f08bdf
diff --git a/web/src/typing_events.ts b/web/src/typing_events.ts
index 8e2bb48170a..16e7c6ccd0b 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 [];
}