Fix JUMP_TO_ACTION handling

This commit is contained in:
Nathan Bierema 2022-01-06 23:05:31 -05:00
parent 93b7f71c8e
commit 58636ea244

View File

@ -218,7 +218,9 @@ export function dispatchAction(
const id = state.selected || state.current;
const liftedState = state.states[id];
const currentStateIndex =
action.type === 'JUMP_TO_STATE' ? action.index : action.actionId;
action.type === 'JUMP_TO_STATE'
? action.index
: liftedState.stagedActionIds[action.actionId];
return {
...state,
states: {