diff --git a/client/src/reducers/undoableConfig.js b/client/src/reducers/undoableConfig.js index 93468c62..59943b9b 100644 --- a/client/src/reducers/undoableConfig.js +++ b/client/src/reducers/undoableConfig.js @@ -59,7 +59,7 @@ const saveOnActions = new Set([ "categorical metadata filter select", "categorical metadata filter deselect", "categorical metadata filter all of these", - "categorical metadata none of these", + "categorical metadata filter none of these", "color by categorical metadata", "color by continuous metadata", @@ -100,9 +100,15 @@ const applyPending = () => ({ [actionKey]: "applyPending", [stateKey]: { fsm: null } }); -const skip = fsm => ({ [actionKey]: "skip", [stateKey]: { fsm } }); +const skip = (fsm, transition) => ({ + [actionKey]: "skip", + [stateKey]: { fsm: transition.to !== "done" ? fsm : null } +}); const clear = () => ({ [actionKey]: "clear", [stateKey]: { fsm: null } }); -const save = fsm => ({ [actionKey]: "save", [stateKey]: { fsm } }); +const save = (fsm, transition) => ({ + [actionKey]: "save", + [stateKey]: { fsm: transition.to !== "done" ? fsm : null } +}); /* Error handler for state transitions that are unexpected. Called by