Skip to content

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

@elsid139

Description

@elsid139

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)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions