js: Fix no-jquery/no-ready-shorthand.

The ready method was deprecated in jQuery 3.0, because its behavior
has nothing to do with the selector; it always waits for the page to
become ready, not a specific element.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2022-03-16 14:19:29 -07:00 committed by Tim Abbott
parent da0658967c
commit 8ef2c0a604
2 changed files with 2 additions and 2 deletions

View File

@ -641,7 +641,7 @@ export function build_emoji_popover($elt, id) {
};
show_emoji_catalog();
$elt.ready(() => refill_section_head_offsets($popover));
$(() => refill_section_head_offsets($popover));
register_popover_events($popover);
}

View File

@ -22,7 +22,7 @@ import {user_settings} from "./user_settings";
export let settings_label;
$("body").ready(() => {
$(() => {
$("#settings_overlay_container").on("click", (e) => {
if (!overlays.is_modal_open()) {
return;