fixed edge case where events.EventEmitter._filters could have not been initialized to an object
Showing
1 changed file
with
1 additions
and
0 deletions
... | @@ -218,6 +218,7 @@ EventEmitter.prototype.listeners = function(type) { | ... | @@ -218,6 +218,7 @@ EventEmitter.prototype.listeners = function(type) { |
218 | EventEmitter.prototype.filter = function() { | 218 | EventEmitter.prototype.filter = function() { |
219 | var type = arguments[0]; | 219 | var type = arguments[0]; |
220 | if (!this._filters) { | 220 | if (!this._filters) { |
221 | this._filters = {}; | ||
221 | return; | 222 | return; |
222 | } | 223 | } |
223 | var filter = this._filters[type]; | 224 | var filter = this._filters[type]; | ... | ... |
-
Please register or sign in to post a comment