modals: Rename close_modal_if_open to close_if_open.

This commit is contained in:
Aman Agrawal
2023-10-10 12:31:36 +00:00
committed by Tim Abbott
parent 0c7184aaa0
commit c809abf07f
3 changed files with 4 additions and 4 deletions

View File

@@ -207,9 +207,9 @@ export function close_modal(modal_id: string, conf: Pick<ModalConfig, "on_hidden
Micromodal.close(modal_id); Micromodal.close(modal_id);
} }
export function close_modal_if_open(modal_id: string): void { export function close_if_open(modal_id: string): void {
if (modal_id === undefined) { if (modal_id === undefined) {
blueslip.error("Undefined id was passed into close_modal_if_open"); blueslip.error("Undefined id was passed into close_if_open");
return; return;
} }

View File

@@ -100,7 +100,7 @@ export function open_send_later_menu() {
} }
export function do_schedule_message(send_at_time) { export function do_schedule_message(send_at_time) {
modals.close_modal_if_open("send_later_modal"); modals.close_if_open("send_later_modal");
if (!Number.isInteger(send_at_time)) { if (!Number.isInteger(send_at_time)) {
// Convert to timestamp if this is not a timestamp. // Convert to timestamp if this is not a timestamp.

View File

@@ -294,7 +294,7 @@ export function get_custom_profile_field_data(user, field, field_types) {
export function hide_user_profile() { export function hide_user_profile() {
user_streams_list_widget = undefined; user_streams_list_widget = undefined;
modals.close_modal_if_open("user-profile-modal"); modals.close_if_open("user-profile-modal");
} }
function show_manage_user_tab(target) { function show_manage_user_tab(target) {