From a0feed47b045a400624faadb0974911af399cb26 Mon Sep 17 00:00:00 2001 From: Markus Grigull Date: Tue, 1 Aug 2017 22:14:43 +0200 Subject: [PATCH] Fix unknown simulator data in table --- src/components/widget-table.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/widget-table.js b/src/components/widget-table.js index 697a48b..56389e9 100644 --- a/src/components/widget-table.js +++ b/src/components/widget-table.js @@ -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;