js: Convert _.reject(a, … => …) to a.filter(… => !…).

And convert the corresponding function expressions to arrow style
while we’re here.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-02-07 18:51:18 -08:00
committed by Tim Abbott
parent 4948240619
commit ef50346a29
14 changed files with 34 additions and 46 deletions

View File

@@ -1233,9 +1233,9 @@ MessageListView.prototype = {
// Convert messages to list messages
let message_containers = messages.map(message => self.message_containers[message.id]);
// We may not have the message_container if the stream or topic was muted
message_containers = _.reject(message_containers, function (message_container) {
return message_container === undefined;
});
message_containers = message_containers.filter(
message_container => message_container !== undefined
);
const message_groups = [];
let current_group = [];