Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
message_edit: Fix 'stream_and_topic_exist_in_edit_history' for topic="".
Prakhar Pratyush82646c4d964a
diff --git a/web/src/message_edit.ts b/web/src/message_edit.tsindex 6f561661d4c..cb2a38fdcfa 100644--- a/web/src/message_edit.ts+++ b/web/src/message_edit.ts@@ -311,7 +311,7 @@ export function stream_and_topic_exist_in_edit_history(}for (const edit_history_event of message.edit_history) {- if (!edit_history_event.prev_stream && !edit_history_event.prev_topic) {+ if (!edit_history_event.prev_stream && edit_history_event.prev_topic === undefined) {// Message was not moved in this edit event.continue;}@@ -324,7 +324,7 @@ export function stream_and_topic_exist_in_edit_history(message_dict.stream_id = edit_history_event.prev_stream;}- if (edit_history_event.prev_topic) {+ if (edit_history_event.prev_topic !== undefined) {// This edit event changed the topic. We expect the// following to be true due to the invariants of the edit// history data structure: