Skip to content

Commit

Permalink
returns listener on eventemitter's "on" function
Browse files Browse the repository at this point in the history
  • Loading branch information
endel authored Feb 14, 2019
1 parent f0df27d commit 7ad9f37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions colyseus/eventemitter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function EventEmitter:new(object)
function object:on (event, listener)
self._on[event] = self._on[event] or {}
table.insert(self._on[event], listener)
return listener
end

function object:off (event, listener)
Expand Down

0 comments on commit 7ad9f37

Please sign in to comment.