From cbe227af6fac2d9851f9968a20bc9ed72f54818a Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 21 Dec 2023 16:07:57 -0800 Subject: [PATCH] eslint: Fix @typescript-eslint/no-unnecessary-boolean-literal-compare. Signed-off-by: Anders Kaseorg --- web/e2e-tests/lib/common.ts | 2 +- web/src/stream_data.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/e2e-tests/lib/common.ts b/web/e2e-tests/lib/common.ts index 1b16563ee2..946f680116 100644 --- a/web/e2e-tests/lib/common.ts +++ b/web/e2e-tests/lib/common.ts @@ -302,7 +302,7 @@ export async function ensure_enter_does_not_send(page: Page): Promise { await page.waitForSelector("#send_later_popover"); const enter_sends = await page.$eval( ".enter_sends_choice input[value='true']", - (el) => el.checked === true, + (el) => el.checked, ); if (enter_sends) { diff --git a/web/src/stream_data.ts b/web/src/stream_data.ts index 0bcc543729..5a03301871 100644 --- a/web/src/stream_data.ts +++ b/web/src/stream_data.ts @@ -517,7 +517,7 @@ export function can_access_topic_history(sub: StreamSubscription): boolean { } export function can_preview(sub: StreamSubscription): boolean { - return sub.subscribed || !sub.invite_only || sub.previously_subscribed === true; + return sub.subscribed || !sub.invite_only || sub.previously_subscribed; } export function can_change_permissions(sub: StreamSubscription): boolean { @@ -762,7 +762,7 @@ export function create_sub_from_server_data( delete attrs.subscribers; sub = { - render_subscribers: !page_params.realm_is_zephyr_mirror_realm || attrs.invite_only === true, + render_subscribers: !page_params.realm_is_zephyr_mirror_realm || attrs.invite_only, newly_subscribed: false, is_muted: false, desktop_notifications: null,