cerebral / overmind

Overmind - Frictionless state management
https://overmindjs.org
MIT License
1.58k stars 95 forks source link

fix(overmind-statechart): avoid throwing config error when fast refresh kicks in #491

Closed schiller-manuel closed 3 years ago

schiller-manuel commented 3 years ago

React's fast refresh reruns statechart when a module that contains this call is edited. As the statechart was already initialized, a config error was thrown since states and matches were already present in the current state. To avoid throwing this error, it is now only thrown when the statechart is first initialized.

schiller-manuel commented 3 years ago

this is a potential solution for https://github.com/cerebral/overmind/issues/492