eslint: Fix unicorn/consistent-existence-index-check.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2024-10-03 16:44:04 -07:00
committed by Tim Abbott
parent 5cbe3203f5
commit 3b79a534a2
7 changed files with 9 additions and 9 deletions

View File

@@ -746,7 +746,7 @@ export class BuddyList extends BuddyListConf {
this.other_user_ids,
]) {
const pos = user_id_list.indexOf(opts.user_id);
if (pos >= 0) {
if (pos !== -1) {
user_id_list.splice(pos, 1);
was_removed = true;
break;
@@ -829,7 +829,7 @@ export class BuddyList extends BuddyListConf {
// it yet.
const pos = this.all_user_ids.indexOf(user_id);
if (pos < 0) {
if (pos === -1) {
return undefined;
}