js: Convert _.chain to array methods.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-02-26 00:27:17 -08:00
committed by Tim Abbott
parent 1fd4762063
commit aa7df21265
3 changed files with 13 additions and 13 deletions

View File

@@ -231,7 +231,10 @@ exports.initialize_kitchen_sink_stuff = function () {
selected_id_from_idx: messages[event.msg_list.selected_idx()].id,
msg_list_sorted: _.isEqual(
messages.map((message) => message.id),
_.chain(current_msg_list.all_messages()).pluck("id").clone().value().sort(),
current_msg_list
.all_messages()
.map((message) => message.id)
.sort(),
),
found_in_dom: row_from_dom.length,
});