statelyai / xstate-viz

Visualizer for XState machines
https://stately.ai/viz
MIT License
434 stars 102 forks source link

when visualizing, throw Error: Maximum call stack size exceeded #340

Closed WangLarry closed 2 years ago

WangLarry commented 2 years ago

viz: https://stately.ai/viz/f4d0b7e0-7f6f-445b-9c36-9ab48d565b9c

judicaelandria commented 2 years ago

Hi @WangLarry, this happened because you misused the eventless transitions here "always" so it creates infinite loops, if you remove the always it should work. as the docs say

Eventless transitions should be defined either with target, cond + target, cond + actions, or cond + target + actions