-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
EventEmitter gets TypeError if EventEmitter.prototype.addListener is called directly. #523
Comments
Seems like it's mostly Sequalize abusing EventEmitter. |
Agreed, but we can't welch on our promise of joyent/node compatibility with little things like this. First one to review #527 gets a cookie. |
bnoordhuis
added a commit
to bnoordhuis/io.js
that referenced
this issue
Jan 20, 2015
Commit 2931348 added EventEmitter#getMaxListeners() but introduced a regression when people abuse EventEmitter.prototype.on.call() to call EventEmitter#on() on a non-EE object. Add a workaround for that. Fixes: nodejs#523 PR-URL: nodejs#527 Reviewed-By: Colin Ihrig <[email protected]>
LGTM. |
Cheers, fixed in ee9cd00. Thanks for the bug report, Yosuke. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got following TypeError. the detail is here (sequelize/sequelize#2966).
I think Sequelize module is wrong,
EventEmitter.prototype.addListener
should not be called directly. However, I don't think this error message is easy to understand. And io.js seems to break node.js compatible on events.I have 4 options, I would like to discuss about the behavior.
this.getMaxListeners
is undefined, events module prints helpful message like "EventEmitter.prototype.addListener should not called directly."this.getMaxListeners
is undefined, return the defaultEventEmitter.defaultMaxListeners
.The text was updated successfully, but these errors were encountered: