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

Bug: emit won't resolve if the return value is undefined #5

Open
zhaoyao91 opened this issue Jan 9, 2020 · 1 comment
Open

Bug: emit won't resolve if the return value is undefined #5

zhaoyao91 opened this issue Jan 9, 2020 · 1 comment

Comments

@zhaoyao91
Copy link

I have a worker like this

worker.on("run", async () => {
  console.log("started");
  await run();
  console.log("finished");
});

however, await worker.emit('run') will never resolve. after changing the worker to

worker.on("run", async () => {
  console.log("started");
  await run();
  console.log("finished");

  return true
});

it resolves.

@zhaoyao91
Copy link
Author

Great lib, saves me tons of life

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

1 participant