mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
js: Avoid _.first, _.last, _.initial, _.tail.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
42931e69e6
commit
cc40352541
@@ -1,5 +1,4 @@
|
||||
import $ from "jquery";
|
||||
import _ from "lodash";
|
||||
|
||||
import * as emoji from "../shared/js/emoji";
|
||||
import render_message_reaction from "../templates/message_reaction.hbs";
|
||||
@@ -172,8 +171,8 @@ function generate_title(emoji_name, user_ids) {
|
||||
);
|
||||
}
|
||||
|
||||
context.comma_separated_usernames = _.initial(usernames).join(", ");
|
||||
context.last_username = _.last(usernames);
|
||||
context.comma_separated_usernames = usernames.slice(0, -1).join(", ");
|
||||
context.last_username = usernames.at(-1);
|
||||
if (current_user_reacted) {
|
||||
return $t(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user