From 1ef77d159698ff8e952dd201b2248c71a0deae13 Mon Sep 17 00:00:00 2001 From: Bruce Martin Date: Fri, 24 May 2019 21:01:11 -0700 Subject: [PATCH] fix misconfiguration for history management (#787) --- client/src/reducers/undoableConfig.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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