From 0c40c5592f2ffd3b0c8925c875826220ba213ea1 Mon Sep 17 00:00:00 2001 From: taylorhakes Date: Thu, 23 Jul 2015 00:33:31 -0400 Subject: [PATCH] Fixed bug in sweep --- src/devTools.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devTools.js b/src/devTools.js index 30db9599..a561c76c 100644 --- a/src/devTools.js +++ b/src/devTools.js @@ -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) {