Skip to content

Commit 9bafa7a

Browse files
committed
don't delete @@init
1 parent f0e1efd commit 9bafa7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/instrument.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ function liftReducerWith(reducer, initialCommittedState, monitorReducer, options
236236
}
237237
case ActionTypes.PERFORM_ACTION: {
238238
if (options.maxAge && stagedActionIds.length === options.maxAge) {
239-
// If maxAge has been reached, remove oldest action
240-
delete actionsById[stagedActionIds[0]];
239+
// If maxAge has been reached, remove oldest action.
240+
delete actionsById[stagedActionIds[1]];
241241
skippedActionIds = skippedActionIds.filter(id => id !== stagedActionIds[0]);
242-
stagedActionIds = stagedActionIds.slice(1);
242+
stagedActionIds = [0].concat(stagedActionIds.slice(2));
243243
committedState = computedStates[1].state;
244244
computedStates = computedStates.slice(1);
245245
}

0 commit comments

Comments
 (0)