Fixed bug in sweep

This commit is contained in:
taylorhakes 2015-07-23 00:33:31 -04:00
parent 53a8c74341
commit 0c40c5592f

View File

@ -129,7 +129,7 @@ function liftReducer(reducer, initialState) {
case ActionTypes.SWEEP:
stagedActions = stagedActions.filter((_, i) => !skippedActions[i]);
skippedActions = {};
currentStateIndex = Math.max(currentStateIndex, stagedActions.length - 1);
currentStateIndex = Math.min(currentStateIndex, stagedActions.length - 1);
break;
case ActionTypes.PERFORM_ACTION:
if (currentStateIndex === stagedActions.length - 1) {