diff --git a/client/src/reducers/undoable.js b/client/src/reducers/undoable.js index 803b74e0..be51cd23 100644 --- a/client/src/reducers/undoable.js +++ b/client/src/reducers/undoable.js @@ -85,6 +85,7 @@ const Undoable = (reducer, undoableKeys, options = {}) => { ); const newPast = [...past]; const newState = newPast.pop(); + const newStateFilterState = newState[filterStateKey]; const newFuture = push(future, currentUndoableState); const nextState = { ...currentState, @@ -93,6 +94,7 @@ const Undoable = (reducer, undoableKeys, options = {}) => { [futureKey]: newFuture, [pendingKey]: null }; + nextState[filterStateKey] = newStateFilterState; return nextState; } diff --git a/client/src/reducers/undoableConfig.js b/client/src/reducers/undoableConfig.js index d29017d4..e30a101a 100644 --- a/client/src/reducers/undoableConfig.js +++ b/client/src/reducers/undoableConfig.js @@ -170,6 +170,8 @@ const actionFilter = debug => (state, action, prevFilterState) => { } if ( debounceOnActions.has(actionType) && + prevFilterState !== undefined && + prevFilterState.prevAction !== undefined && shallowObjectEq(action, prevFilterState.prevAction) ) { return { [actionKey]: "skip", [stateKey]: filterState };