mirror of https://github.com/zulip/zulip.git
eslint: Fix @typescript-eslint/no-useless-template-literals.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
2dca29ce5a
commit
24ecafbdd2
|
@ -9,7 +9,7 @@ import type {Message} from "./message_store";
|
|||
// one needs an outer element wrapping an object to use this
|
||||
// construction.
|
||||
function is_element_in_message_content(message: Message, element_selector: string): boolean {
|
||||
return $(`<div>${message.content}</div>`).find(`${element_selector}`).length > 0;
|
||||
return $(`<div>${message.content}</div>`).find(element_selector).length > 0;
|
||||
}
|
||||
|
||||
export function message_has_link(message: Message): boolean {
|
||||
|
|
|
@ -221,9 +221,9 @@ export function close_if_open(modal_id: string): void {
|
|||
}
|
||||
|
||||
const $micromodal = $(".micromodal.modal--open");
|
||||
const active_modal_id = CSS.escape(`${CSS.escape($micromodal.attr("id") ?? "")}`);
|
||||
if (active_modal_id === `${CSS.escape(modal_id)}`) {
|
||||
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
|
||||
const active_modal_id = CSS.escape(CSS.escape($micromodal.attr("id") ?? ""));
|
||||
if (active_modal_id === CSS.escape(modal_id)) {
|
||||
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
|
||||
} else {
|
||||
blueslip.info(
|
||||
`${active_modal_id} is the currently active modal and ${modal_id} is already closed.`,
|
||||
|
@ -238,7 +238,7 @@ export function close_active(): void {
|
|||
}
|
||||
|
||||
const $micromodal = $(".micromodal.modal--open");
|
||||
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
|
||||
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
|
||||
}
|
||||
|
||||
export function close_active_if_any(): void {
|
||||
|
|
|
@ -25,7 +25,7 @@ export function close_active(): void {
|
|||
}
|
||||
|
||||
const $micromodal = $(".micromodal.modal--open");
|
||||
Micromodal.close(`${CSS.escape($micromodal.attr("id") ?? "")}`);
|
||||
Micromodal.close(CSS.escape($micromodal.attr("id") ?? ""));
|
||||
}
|
||||
|
||||
export function open(modal_id: string, recursive_call_count = 0): void {
|
||||
|
|
Loading…
Reference in New Issue