mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 09:36:43 +03:00
start new chain of actions if an action is lifted when the currentStateIndex isn't at the most recent state
This commit is contained in:
parent
9e9d23daf3
commit
3e4eaab207
|
@ -135,8 +135,12 @@ function liftReducer(reducer, initialState) {
|
|||
case ActionTypes.PERFORM_ACTION:
|
||||
if (currentStateIndex === stagedActions.length - 1) {
|
||||
currentStateIndex++;
|
||||
stagedActions = [...stagedActions, liftedAction.action];
|
||||
} else {
|
||||
stagedActions = stagedActions.slice(0, currentStateIndex + 1).concat(liftedAction.action);
|
||||
currentStateIndex = stagedActions.length - 1;
|
||||
skippedActions = {};
|
||||
}
|
||||
stagedActions = [...stagedActions, liftedAction.action];
|
||||
break;
|
||||
case ActionTypes.SET_MONITOR_STATE:
|
||||
monitorState = liftedAction.monitorState;
|
||||
|
|
Loading…
Reference in New Issue
Block a user