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

.can(transition) doesn't work as expected. #207

Open
elsid139 opened this issue Dec 7, 2022 · 0 comments
Open

.can(transition) doesn't work as expected. #207

elsid139 opened this issue Dec 7, 2022 · 0 comments

Comments

@elsid139
Copy link

elsid139 commented Dec 7, 2022

An element of transitions: [] is as below:
{name: 'deleteRec', from: ['idle', 'deleting', 'renaming'], to: function(s) {return s; }},
I call the transition in the state of 'idle' as below, but the condition always returns false!
if (fsm.can('deleteRec')) {

So I have to use if (['idle', 'deleting', 'renaming'].includes(fsm.state)) {

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