File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/node_modules/overmind-statechart/src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -272,13 +272,13 @@ export function statechart<
272272 const actions = config . actions || { }
273273 const state = config . state || { }
274274
275- if ( config . state && ( config . state as any ) . states ) {
275+ if ( currentInstance !== undefined && config . state && ( config . state as any ) . states ) {
276276 throw new Error (
277277 `Overmind statecharts: You have already defined the state "states" in your configuration. Statecharts needs this, please rename it`
278278 )
279279 }
280280
281- if ( config . state && ( config . state as any ) . matches ) {
281+ if ( currentInstance !== undefined && config . state && ( config . state as any ) . matches ) {
282282 throw new Error (
283283 `Overmind statecharts: You have already defined the state "matches" in your configuration. Statecharts needs this, please rename it`
284284 )
You can’t perform that action at this time.
0 commit comments