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.

eslint: Fix unicorn/require-iterator-helpers.

Anders Kaseorgd141801fe5e4
diff --git a/web/src/peer_data.ts b/web/src/peer_data.ts
index b8ba11c34cf..d4dedc8dd32 100644
--- a/web/src/peer_data.ts
+++ b/web/src/peer_data.ts
@@ -225,7 +225,7 @@ export async function is_subscriber_subset(
return null;
}
- return [...sub1_set.keys()].every((key) => {
+ return sub1_set.keys().every((key) => {
// If the user is in the linked stream, the check passes.
if (sub2_set.has(key)) {
return true;
diff --git a/web/src/reactions.ts b/web/src/reactions.ts
index a602f34ac9e..0f38c21f358 100644
--- a/web/src/reactions.ts
+++ b/web/src/reactions.ts
@@ -748,7 +748,7 @@ export function update_user_full_name(user_id: number): void {
// vote text may contain display names.
for (const msg_list of message_lists.all_rendered_message_lists()) {
for (const message of msg_list.all_messages()) {
- if ([...message.clean_reactions.values()].some((r) => r.user_ids.includes(user_id))) {
+ if (message.clean_reactions.values().some((r) => r.user_ids.includes(user_id))) {
update_vote_text_on_message(message);
}
}
diff --git a/web/src/stream_topic_history.ts b/web/src/stream_topic_history.ts
index ffa178ad7b3..a739940620b 100644
--- a/web/src/stream_topic_history.ts
+++ b/web/src/stream_topic_history.ts
@@ -112,7 +112,7 @@ export class PerStreamHistory {
}
has_resolved_topics(): boolean {
- return [...this.topics.keys()].some((topic) => resolved_topics.is_resolved(topic));
+ return this.topics.keys().some((topic) => resolved_topics.is_resolved(topic));
}
has_topics(): boolean {