mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
js: Convert _.find(a, …) to a.find(…).
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:
committed by
Tim Abbott
parent
cdd774b790
commit
336a279005
@@ -90,9 +90,7 @@ exports.update_message = function (submsg) {
|
||||
message.submessages = [];
|
||||
}
|
||||
|
||||
const existing = _.find(message.submessages, function (sm) {
|
||||
return sm.id === submsg.id;
|
||||
});
|
||||
const existing = message.submessages.find(sm => sm.id === submsg.id);
|
||||
|
||||
if (existing !== undefined) {
|
||||
blueslip.warn("Got submessage multiple times: " + submsg.id);
|
||||
|
||||
Reference in New Issue
Block a user