1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-30 00:00:13 +01:00

Fix simulator data discarding

This commit is contained in:
Markus Grigull 2017-07-13 17:13:18 +02:00
parent ac19c3c48d
commit fa9fc61725
2 changed files with 1 additions and 3 deletions

View file

@ -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 });

View file

@ -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;
}