Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
drafts: Fix bug opening drafts in 'general chat'.
evykassirer8a51fa4b8384
diff --git a/web/src/drafts.ts b/web/src/drafts.tsindex 482e262e54c..f3ef5b115bc 100644--- a/web/src/drafts.ts+++ b/web/src/drafts.ts@@ -506,9 +506,9 @@ export function filter_drafts_by_compose_box_and_recipient(// Match by stream and topic.if (stream_id &&- topic &&+ topic !== undefined &&draft.type === "stream" &&- draft.topic &&+ draft.topic !== undefined &&draft.stream_id !== undefined &&util.same_recipient({type: "stream", stream_id: draft.stream_id, topic: draft.topic},@@ -518,7 +518,12 @@ export function filter_drafts_by_compose_box_and_recipient(narrow_drafts_ids.push(id);}// Match by only stream.- else if (draft.type === "stream" && stream_id && !topic && draft.stream_id === stream_id) {+ else if (+ draft.type === "stream" &&+ stream_id &&+ topic === undefined &&+ draft.stream_id === stream_id+ ) {narrow_drafts_ids.push(id);}// Match by direct message recipient.