Closed yaodingyd closed 5 years ago
Do you have an example?
Sure!
var emitter = new Emitter();
emmitter.on('toString', function(){
console.log('I just want to use toString as an event name')
})
Currently it would show (e[name] || (intermediate value)(intermediate value)).push is not a function
because e.toString
is truthy, but we really want an array.
@scottcorgan any update?
This fix if we are trying to intentional overwrite object's native properties as event name, like 'toString'