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.

poll_modal: Fix implicit use of any.

Anders Kaseorg897dffa5984a
diff --git a/web/src/poll_modal.ts b/web/src/poll_modal.ts
index 269ee04e7e0..b84542fbafd 100644
--- a/web/src/poll_modal.ts
+++ b/web/src/poll_modal.ts
@@ -9,20 +9,20 @@ function create_option_row($last_option_row_input: JQuery): void {
$row_container.append($(row_html));
}
-function add_option_row(e: JQuery.TriggeredEvent): void {
+function add_option_row(this: HTMLElement): void {
// if the option triggering the input event e is not the last,
// that is, its next sibling has the class `option-row`, we
// do not add a new option row and return from this function
// This handles a case when the next empty input row is already
// added and user is updating the above row(s).
- if ($(e.target).closest(".option-row").next().hasClass("option-row")) {
+ if ($(this).closest(".option-row").next().hasClass("option-row")) {
return;
}
- create_option_row($(e.target));
+ create_option_row($(this));
}
-function delete_option_row(e: JQuery.ClickEvent): void {
- const $row = $(e.target).closest(".option-row");
+function delete_option_row(this: HTMLElement): void {
+ const $row = $(this).closest(".option-row");
$row.remove();
}