Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

popovers: Don't trigger remind handler on every flatpickr confirm.

Aman Agrawalfa4311e7d002
diff --git a/static/js/popovers.js b/static/js/popovers.js
index 78a72086592..9fd29594dc5 100644
--- a/static/js/popovers.js
+++ b/static/js/popovers.js
@@ -1131,8 +1131,10 @@ export function register_click_handlers() {
});
$("body").on("click", ".flatpickr-confirm", (e) => {
- const datestr = $(".remind.custom")[0].value;
- reminder_click_handler(datestr, e);
+ if ($(".remind.custom")[0]) {
+ const datestr = $(".remind.custom")[0].value;
+ reminder_click_handler(datestr, e);
+ }
});
$("body").on("click", ".respond_personal_button, .compose_private_message", (e) => {