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.

drafts: Refactor function to have a default value for its 1 parameter.

N-Shar-ma6ec04c24696b
diff --git a/web/src/drafts.ts b/web/src/drafts.ts
index 022285f97bd..f78b8c8fb0a 100644
--- a/web/src/drafts.ts
+++ b/web/src/drafts.ts
@@ -429,7 +429,7 @@ export function current_recipient_data(): {
}
export function filter_drafts_by_compose_box_and_recipient(
- drafts: Record<string, LocalStorageDraft>,
+ drafts = draft_model.get(),
): Record<string, LocalStorageDraft> {
const {stream_name, topic, private_recipients} = current_recipient_data();
const stream_id = stream_name ? stream_data.get_stream_id(stream_name) : undefined;