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? can() and cannot() fail when asking about wildcard transition that accepts args #133

Open
adami opened this issue Sep 11, 2017 · 0 comments

Comments

@adami
Copy link

adami commented Sep 11, 2017

I started using fsm.cannot(transition) to see if my fsm can handle the incoming transition before applying it.

It looks like using it for wildcard transitions that accept args (e.g. the famous "goto") returns the wrong result.
If I understand correctly, it's because these methods use the seek() method that tries to use the args to see which state the wildcard is sending the fsm to, but can() and cannot() are not passing it.

As a workaround i use fsm.transitions().includes(transition) that i think does what fsm.can() is supposed to do.

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