From fa9fc617252e81844e60a1294663d2fc8d778fc5 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Thu, 13 Jul 2017 17:13:18 +0200 Subject: [PATCH] Fix simulator data discarding --- src/components/dialog/new-simulation-model.js | 2 -- src/stores/simulator-data-store.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/dialog/new-simulation-model.js b/src/components/dialog/new-simulation-model.js index 8ae219c..a0af323 100644 --- a/src/components/dialog/new-simulation-model.js +++ b/src/components/dialog/new-simulation-model.js @@ -48,7 +48,6 @@ class NewSimulationModelDialog extends Component { onClose(canceled) { if (canceled === false) { - console.log(this.state); this.props.onClose(this.state); } else { this.props.onClose(); @@ -70,7 +69,6 @@ class NewSimulationModelDialog extends Component { } if (e.target.id === 'simulator') { - console.log(e.target.value); this.setState({ simulator: JSON.parse(e.target.value) }); } else { this.setState({ [e.target.id]: e.target.value }); diff --git a/src/stores/simulator-data-store.js b/src/stores/simulator-data-store.js index 5f5a829..2dd4336 100644 --- a/src/stores/simulator-data-store.js +++ b/src/stores/simulator-data-store.js @@ -55,7 +55,7 @@ class SimulationDataStore extends ReduceStore { case 'simulatorData/data-changed': // check if data is required, otherwise discard - if (state[action.node._id] == null || state[action.data.id] == null) { + if (state[action.node._id] == null || state[action.node._id][action.data.id] == null) { return state; }