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

Fix unknown simulator data in table

This commit is contained in:
Markus Grigull 2017-08-01 22:14:43 +02:00
parent 5d9f24e304
commit a0feed47b0

View file

@ -38,7 +38,11 @@ class WidgetTable extends Component {
// check data
const simulator = nextProps.widget.simulator;
if (nextProps.simulation == null || nextProps.data == null || nextProps.data[simulator.node][simulator.simulator] == null || nextProps.data[simulator.node][simulator.simulator].length === 0 || nextProps.data[simulator.node][simulator.simulator].values.length === 0 || nextProps.data[simulator.node][simulator.simulator].values[0].length === 0) {
if (nextProps.simulation == null || nextProps.data == null || nextProps.data[simulator.node] == null
|| nextProps.data[simulator.node][simulator.simulator] == null
|| nextProps.data[simulator.node][simulator.simulator].length === 0
|| nextProps.data[simulator.node][simulator.simulator].values.length === 0
|| nextProps.data[simulator.node][simulator.simulator].values[0].length === 0) {
// clear values
this.setState({ rows: [], sequence: null });
return;