This repository was archived by the owner on Apr 8, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ export function reduce(
162
162
nextState = appearPendingState ( props ) ;
163
163
break ;
164
164
default :
165
- throw new Error ( " invalid state transition" ) ;
165
+ throw new Error ( ` invalid state transition from ${ StateID [ state . id ] } ` ) ;
166
166
} ;
167
167
return { state : nextState , pending : ActionID . TransitionTrigger } ;
168
168
case ActionID . TransitionStart :
@@ -191,7 +191,7 @@ export function reduce(
191
191
if ( props . onTransitionComplete ) { props . onTransitionComplete ( ) ; }
192
192
return { state : defaultState ( props ) } ;
193
193
default :
194
- throw new Error ( " invalid state transition" ) ;
194
+ throw new Error ( ` invalid state transition from ${ StateID [ state . id ] } ` ) ;
195
195
}
196
196
case ActionID . TransitionTrigger :
197
197
switch ( state . id ) {
@@ -228,7 +228,7 @@ export function reduce(
228
228
case StateID . LeaveStarted :
229
229
return { state : enterStartedState ( props ) } ;
230
230
default :
231
- throw new Error ( " invalid state transition" ) ;
231
+ throw new Error ( ` invalid state transition from ${ StateID [ state . id as any ] } ` ) ;
232
232
}
233
233
default :
234
234
}
You can’t perform that action at this time.
0 commit comments