Skip to content

jquery-api's codemod incorrectly transforms custom events #39

@runspired

Description

@runspired

since these are custom jquery events they would not be subscribable in this way:

-            this.$(".modal.show")
-              .on("hidden.bs.modal", (e) => {
+            this.element.querySelectorAll(".modal.show").forEach(el => el.addEventListener("hidden.bs.modal", (e) => {
                 if (this.allAssigned) {
                   this.sendAction("allAssigned");
                 }
                 $(e.currentTarget).unbind();
-              })
+              }))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions