eslint: Fix unicorn/prefer-string-replace-all.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-05-11 12:49:10 -07:00
committed by Tim Abbott
parent fe54df0b01
commit 54f90e41c0
16 changed files with 42 additions and 37 deletions

View File

@@ -224,7 +224,9 @@ export function start(msg_type, opts) {
compose_state.topic(opts.topic);
// Set the recipients with a space after each comma, so it looks nice.
compose_state.private_message_recipient(opts.private_message_recipient.replace(/,\s*/g, ", "));
compose_state.private_message_recipient(
opts.private_message_recipient.replaceAll(/,\s*/g, ", "),
);
// If the user opens the compose box, types some text, and then clicks on a
// different stream/topic, we want to keep the text in the compose box