Skip to content

Commit

Permalink
fix(removeEvent): fix detachEvent typo (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
daformat authored Feb 7, 2024
1 parent aa2f124 commit 1e802bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function addEvent(object, event, method, useCapture) {
function removeEvent(object, event, method, useCapture) {
if (object.removeEventListener) {
object.removeEventListener(event, method, useCapture);
} else if (object.deachEvent) {
object.deachEvent(`on${event}`, method);
} else if (object.detachEvent) {
object.detachEvent(`on${event}`, method);
}
}

Expand Down

0 comments on commit 1e802bd

Please sign in to comment.