mirror of https://github.com/zulip/zulip.git
popovers: Check for undefined message.edit_history.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
8dee0ab1e0
commit
4fa1075840
|
@ -439,10 +439,15 @@ exports.toggle_actions_popover = function (element, id) {
|
||||||
topic &&
|
topic &&
|
||||||
muting.is_topic_muted(message.stream_id, topic);
|
muting.is_topic_muted(message.stream_id, topic);
|
||||||
|
|
||||||
const should_display_edit_history_option = _.any(message.edit_history, function (entry) {
|
const should_display_edit_history_option =
|
||||||
const prev_topic = util.get_edit_event_prev_topic(entry);
|
message.edit_history &&
|
||||||
return entry.prev_content !== undefined || prev_topic !== undefined;
|
_.any(
|
||||||
}) && page_params.realm_allow_edit_history;
|
message.edit_history,
|
||||||
|
entry =>
|
||||||
|
entry.prev_content !== undefined ||
|
||||||
|
util.get_edit_event_prev_topic(entry) !== undefined
|
||||||
|
) &&
|
||||||
|
page_params.realm_allow_edit_history;
|
||||||
|
|
||||||
// Disabling this for /me messages is a temporary workaround
|
// Disabling this for /me messages is a temporary workaround
|
||||||
// for the fact that we don't have a styling for how that
|
// for the fact that we don't have a styling for how that
|
||||||
|
|
Loading…
Reference in New Issue