Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in irc/client.js when user list has or had nickname "hasOwnProperty" #44

Closed
Krinkle opened this issue Jul 11, 2014 · 2 comments · Fixed by #45
Closed

Error in irc/client.js when user list has or had nickname "hasOwnProperty" #44

Krinkle opened this issue Jul 11, 2014 · 2 comments · Fixed by #45

Comments

@Krinkle
Copy link
Contributor

Krinkle commented Jul 11, 2014

Both when the initial name change happens and for every unrelated NICK event after that, the following error is thrown:

TypeError: Property 'hasOwnProperty' of object #<Object> is not a function
    at Client.events.data (/Users/krinkle/Development/oftn-bot/lib/irc/client.js:314:29)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:748:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:410:10)
    at emitReadable (_stream_readable.js:406:5)
    at readableAddChunk (_stream_readable.js:168:9)
    at Socket.Readable.push (_stream_readable.js:130:10)
    at TCP.onread (net.js:528:21)
@Krinkle
Copy link
Contributor Author

Krinkle commented Jul 11, 2014

This is a valid nick name on chat.freenode.net, presumably elsewhere as well.

@eligrey
Copy link
Member

eligrey commented Jul 11, 2014

This is exactly why I always use Object.prototype.hasOwnProperty.call(obj, prop) in my projects.

@Krinkle Can you submit a pullreq to make that file use that wherever appropriate, instead of hasOwnProperty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants