Skip to content

Commit

Permalink
refactor(lib): small update in lib/emitter_wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
lusarz committed Oct 16, 2018
1 parent c311ac0 commit 1458267
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/emitter_wrapper.js
Expand Up @@ -8,13 +8,8 @@ class EmitterWrapper {

addListener (event, listener) {
this.emitter.addListener(event, listener)

if (!this.listeners.hasOwnProperty(event)) {
this.listeners[event] = []
}

this.listeners[event] = this.listeners[event] || []
this.listeners[event].push(listener)

return this
}

Expand Down

0 comments on commit 1458267

Please sign in to comment.