eslint: Fix unicorn/require-array-join-separator.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2021-06-07 19:12:05 -07:00 committed by Tim Abbott
parent 7fd1e33d1b
commit 656344064a
2 changed files with 4 additions and 4 deletions

View File

@ -770,14 +770,14 @@ function validate_private_message() {
let context = {}; let context = {};
if (invalid_recipients.length === 1) { if (invalid_recipients.length === 1) {
context = {recipient: invalid_recipients.join()}; context = {recipient: invalid_recipients.join(",")};
compose_error( compose_error(
$t_html({defaultMessage: "The recipient {recipient} is not valid"}, context), $t_html({defaultMessage: "The recipient {recipient} is not valid"}, context),
$("#private_message_recipient"), $("#private_message_recipient"),
); );
return false; return false;
} else if (invalid_recipients.length > 1) { } else if (invalid_recipients.length > 1) {
context = {recipients: invalid_recipients.join()}; context = {recipients: invalid_recipients.join(",")};
compose_error( compose_error(
$t_html({defaultMessage: "The recipients {recipients} are not valid"}, context), $t_html({defaultMessage: "The recipients {recipients} are not valid"}, context),
$("#private_message_recipient"), $("#private_message_recipient"),

View File

@ -550,9 +550,9 @@ export class Filter {
case "streams-public": case "streams-public":
return "/#narrow/streams/public"; return "/#narrow/streams/public";
case "pm-with": case "pm-with":
// join is used to transform the array to a comma separated string
return ( return (
"/#narrow/pm-with/" + people.emails_to_slug(this.operands("pm-with").join()) "/#narrow/pm-with/" +
people.emails_to_slug(this.operands("pm-with").join(","))
); );
// TODO: It is ambiguous how we want to handle the 'sender' case, // TODO: It is ambiguous how we want to handle the 'sender' case,
// we may remove it in the future based on design decisions // we may remove it in the future based on design decisions