DEV: Use native element.closest() (#17482)

This commit is contained in:
Jarek Radosz
2022-07-14 08:57:24 +08:00
committed by GitHub
parent abe9b41ddf
commit 3ada82f713
8 changed files with 25 additions and 24 deletions
@@ -70,7 +70,7 @@ createWidget("discourse-poll-option", {
},
click(e) {
if ($(e.target).closest("a").length === 0) {
if (!e.target.closest("a")) {
this.sendWidgetAction("toggleOption", this.attrs.option);
}
},