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

emit arguments not working #1

Open
hsocarras opened this issue Nov 3, 2016 · 2 comments
Open

emit arguments not working #1

hsocarras opened this issue Nov 3, 2016 · 2 comments

Comments

@hsocarras
Copy link

I tried EM.emit('test','someArgumet') and not work.

I guess that the problem is in emit function.
while (len--) {
if (len === 1) {
// We do not need first argument.
break;
}
args[len] = arguments[len];
}
if len==2 like the example then len-- == 1 and the while break;

@yzi-yzi
Copy link

yzi-yzi commented Apr 10, 2019

I still get the problem. I have no idea to get data from emit()

EM.emit('foo', { key: value });

EM.on('foo', function(data) { // data return [empty] });

@hsocarras
Copy link
Author

I forked this project and fix the problem.

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

No branches or pull requests

2 participants