Skip to content

Eve fails for event names including Object.prototype properties #9

Description

@hitsthings

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()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions