compose_send_menu_popover: Fix check for closed popover.

An empty jQuery object is still truthy.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-05-09 14:16:57 -07:00
committed by Tim Abbott
parent 1b9a8dbc52
commit b8923128c9

View File

@@ -131,7 +131,7 @@ export function do_schedule_message(send_at_time) {
function get_send_later_menu_items() {
const $current_schedule_popover_elem = $("[data-tippy-root] #send_later_popover");
if (!$current_schedule_popover_elem) {
if ($current_schedule_popover_elem.length === 0) {
blueslip.error("Trying to get menu items when schedule popover is closed.");
return undefined;
}