Skip to content

Commit

Permalink
Fix removeListener()
Browse files Browse the repository at this point in the history
  • Loading branch information
iizukanao committed Sep 22, 2021
1 parent d9fbcec commit 575eb8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event_emitter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class EventEmitterModule
if @eventListeners?[name]?
for _listener, i in @eventListeners[name]
if _listener is listener
@eventListeners[i..i] = [] # remove element at index i
@eventListeners[name][i..i] = [] # remove element at index i
return

off: (name, listener) ->
Expand Down

0 comments on commit 575eb8e

Please sign in to comment.