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/no-useless-delete-check.

Anders Kaseorg3eea4be0bf5e
diff --git a/web/src/stream_topic_history.ts b/web/src/stream_topic_history.ts
index b87c1d63f61..92adce2f27c 100644
--- a/web/src/stream_topic_history.ts
+++ b/web/src/stream_topic_history.ts
@@ -430,11 +430,6 @@ export function remove_request_pending_for(stream_id: number): void {
export function remove_history_for_stream(stream_id: number): void {
// Currently only used when user loses access to a stream.
- if (stream_dict.has(stream_id)) {
- stream_dict.delete(stream_id);
- }
-
- if (fetched_stream_ids.has(stream_id)) {
- fetched_stream_ids.delete(stream_id);
- }
+ stream_dict.delete(stream_id);
+ fetched_stream_ids.delete(stream_id);
}