Skip to content

Commit

Permalink
Fix import state for 2.11.1 version of the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Dec 2, 2016
1 parent 0241a7c commit 847c01d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/monitorActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
}

0 comments on commit 847c01d

Please sign in to comment.