Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

Anders Kaseorg656344064a20
diff --git a/static/js/compose.js b/static/js/compose.js
index 019f915747f..ad8e5e4851c 100644
--- a/static/js/compose.js
+++ b/static/js/compose.js
@@ -770,14 +770,14 @@ function validate_private_message() {
let context = {};
if (invalid_recipients.length === 1) {
- context = {recipient: invalid_recipients.join()};
+ context = {recipient: invalid_recipients.join(",")};
compose_error(
$t_html({defaultMessage: "The recipient {recipient} is not valid"}, context),
$("#private_message_recipient"),
);
return false;
} else if (invalid_recipients.length > 1) {
- context = {recipients: invalid_recipients.join()};
+ context = {recipients: invalid_recipients.join(",")};
compose_error(
$t_html({defaultMessage: "The recipients {recipients} are not valid"}, context),
$("#private_message_recipient"),
diff --git a/static/js/filter.js b/static/js/filter.js
index 4fbdf8b2654..c786d818124 100644
--- a/static/js/filter.js
+++ b/static/js/filter.js
@@ -550,9 +550,9 @@ export class Filter {
case "streams-public":
return "/#narrow/streams/public";
case "pm-with":
- // join is used to transform the array to a comma separated string
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,
// we may remove it in the future based on design decisions