SimonGAndrews / xstate-fsm-Espruino

fork of the finite state machine (FSM), XState/fsm, with modifications necessary to run it as a module within the Espruino JavaScript Interpreter for Microcontrollers
MIT License
0 stars 0 forks source link

"nonAssigned" is not defined in function "transition" of const "machine" #9

Closed SimonGAndrews closed 3 years ago

SimonGAndrews commented 3 years ago

image Above error occurs running test_basicMachine.js inEsprunio on esp32. Another destructuging assignment like #6

SimonGAndrews commented 3 years ago

image Replaced the original destructuring assignment (Array) with the above.

Mod now passes regression test test\Node\xstate-fsm\fsm.test.js in jest and fixes the issue when running in Esprunio on esp32.

SimonGAndrews commented 3 years ago

subsequent testing showed the fix needed changing to: image ie copying three elements of the array with ...slice(0,3) and not ...slice(0,2)