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

EventBus.on throws when callback is an async function or generator #329

Closed
xcrzx opened this issue May 7, 2019 · 1 comment
Closed

EventBus.on throws when callback is an async function or generator #329

xcrzx opened this issue May 7, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@xcrzx
Copy link

xcrzx commented May 7, 2019

Describe the Bug

Due to the bug in min-dash (bpmn-io/min-dash#10) when an async function is passed as the second argument to EventBus.prototype.on (https://github.com/bpmn-io/diagram-js/blob/master/lib/core/EventBus.js#L124) it throws new Error('priority must be a number').

Steps to Reproduce

eventBus.on('foo', async function() {});

Throws: Error: Uncaught [Error: priority must be a number]

Expected Behavior

It doesn't throw.

Environment

Please complete the following information:

  • Browser: Chrome 74
  • OS: OS X
  • Library version: 3.3.0
@barmac
Copy link
Member

barmac commented May 9, 2019

This will be fixed with next min-dash release and update.

@barmac barmac added bug Something isn't working ready Ready to be worked on labels May 9, 2019
@nikku nikku closed this as completed in 1fa7521 May 16, 2019
@nikku nikku removed the ready Ready to be worked on label May 16, 2019
nikku added a commit to bpmn-io/bpmn-js that referenced this issue May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants