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

once() method call can cause inifinite loop. #8

Closed
invalidred opened this issue Aug 22, 2014 · 3 comments
Closed

once() method call can cause inifinite loop. #8

invalidred opened this issue Aug 22, 2014 · 3 comments
Labels

Comments

@invalidred
Copy link
Collaborator

var event = new Events();
var func1 = new function() {
// should not call func1 again, but it does. Infinite loop happens.
event.emit('a',[]);
};

event.once('a', func1);
event.emit('a', []);

@anvk
Copy link
Owner

anvk commented Aug 22, 2014

That is a serious problem. do you think you can create a Pull Request for this one ?

@anvk anvk added the bug label Aug 22, 2014
@anvk
Copy link
Owner

anvk commented Aug 23, 2014

This change sounds like a version bump worthy. Maybe also create a test case which would show that the example you specified is no longer the case. Thanks for contributing!

@invalidred
Copy link
Collaborator Author

This issue has been solved

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

No branches or pull requests

2 participants