left_sidebar_navigation_area: 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 f15c2c5dfd
commit 74bfa62d78
1 changed files with 2 additions and 2 deletions

View File

@ -97,14 +97,14 @@ export function handle_narrow_activated(filter: Filter): void {
// TODO: handle confused filters like "in:all stream:foo"
ops = filter.operands("in");
if (ops.length >= 1) {
if (ops[0] !== undefined) {
filter_name = ops[0];
if (filter_name === "home") {
highlight_all_messages_view();
}
}
ops = filter.operands("is");
if (ops.length >= 1) {
if (ops[0] !== undefined) {
filter_name = ops[0];
if (filter_name === "starred") {
$filter_li = $(".top_left_starred_messages");