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

Author: elsid139Created Dec 7, 2022Updated 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)) {

Source: jakesgordon/javascript-state-machine