fix console error

pull/216/head
Aevann 2023-10-17 23:35:47 +03:00
parent 0d2d704b64
commit f1703f31f6
1 changed files with 8 additions and 3 deletions

View File

@ -289,7 +289,10 @@ function reload() {
} }
function sendFormXHR(form, extraActionsOnSuccess) { function sendFormXHR(form, extraActionsOnSuccess) {
close_inline_speed_emoji_modal(); if (typeof close_inline_speed_emoji_modal === "function") {
close_inline_speed_emoji_modal();
}
const t = form.querySelector('[type="submit"]') const t = form.querySelector('[type="submit"]')
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
@ -674,8 +677,10 @@ if (screen_width < 768) {
} }
} }
document.addEventListener('hide.bs.modal', function (e) { document.addEventListener('hide.bs.modal', () => {
close_inline_speed_emoji_modal(); if (typeof close_inline_speed_emoji_modal === "function") {
close_inline_speed_emoji_modal();
}
}); });
document.querySelectorAll('form').forEach(form => { document.querySelectorAll('form').forEach(form => {