mirror of https://github.com/zulip/zulip.git
widgets: Fix bug where `process_submessages()` was run for empty rows.
We now check if the row exists in the current view, and only then do we process the submessages in it, instead of letting `Error: Failed to do_process_submessages` happen.
This commit is contained in:
parent
4fcf7945b0
commit
68c83bce44
|
@ -90,8 +90,9 @@ export function get_message_events(message: Message): SubmessageEvents | undefin
|
|||
|
||||
export function process_widget_rows_in_list(list: MessageList | undefined): void {
|
||||
for (const message_id of widgetize.widget_event_handlers.keys()) {
|
||||
if (list?.get(message_id) !== undefined) {
|
||||
process_submessages({message_id, $row: list.get_row(message_id)});
|
||||
const $row = list?.get_row(message_id);
|
||||
if ($row && $row.length !== 0) {
|
||||
process_submessages({message_id, $row});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue