eve icon indicating copy to clipboard operation
eve copied to clipboard

Eve fails for event names including Object.prototype properties

Open hitsthings opened this issue 12 years ago • 0 comments

E.g.

 > eve.on('thing.constructor.hi', function() {})
TypeError: Cannot read property 'hi' of undefined

This is because your recursive traversal through the events object sees that e[names[i]] exists, and then tries to read e[names[i]].n.

We hit this with "watch" in Firefox where there's an Object.prototype.watch()

hitsthings avatar Sep 12 '12 07:09 hitsthings