mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 23:43:43 +00:00
drafts: Refactor function to have a default value for its 1 parameter.
For function `filter_drafts_by_compose_box_and_recipient` since the set of drafts to filter from is almost definitely going to always be all drafts, we make the required drafts parameter optional with the default value of all drafts. This is a prep commit for the next commit which will use this function.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user