From 847c01dd5134c9d3e46ac28d6081ba4cabe05c6d Mon Sep 17 00:00:00 2001 From: Zalmoxisus Date: Fri, 2 Dec 2016 16:08:08 +0200 Subject: [PATCH] Fix import state for `2.11.1` version of the extension --- src/monitorActions.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/monitorActions.js b/src/monitorActions.js index dc7e83c..9713a58 100644 --- a/src/monitorActions.js +++ b/src/monitorActions.js @@ -72,14 +72,16 @@ export function dispatchMonitorAction(store, devTools, onlyActions) { } devTools.send(null, toggleAction(store, message.payload.id, message.state)); return; + case 'IMPORT_STATE': { + const { nextLiftedState } = message.payload; + const { computedStates } = nextLiftedState; + setValue(store, computedStates[computedStates.length - 1].state); + devTools.send(null, nextLiftedState); + return; + } } } else if (message.type === 'ACTION') { dispatchRemotely(devTools, store, message.payload); - } else if (message.type === 'IMPORT') { - const liftedState = parse(message.state); - const { computedStates } = liftedState; - setValue(store, computedStates[computedStates.length - 1].state); - devTools.send(null, liftedState); } }; }