From 52865c97f820b883977179930ce4961abdb39c12 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 3 Jul 2020 11:46:29 +0200 Subject: Fix integer IDs and topology deletion --- frontend/src/pages/App.js | 4 ++-- frontend/src/pages/Experiments.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'frontend/src/pages') diff --git a/frontend/src/pages/App.js b/frontend/src/pages/App.js index 3034f7ff..89d1fa32 100644 --- a/frontend/src/pages/App.js +++ b/frontend/src/pages/App.js @@ -92,12 +92,12 @@ class AppComponent extends React.Component { const mapStateToProps = (state) => { let simulationName = undefined - if (state.currentSimulationId !== -1 && state.objects.simulation[state.currentSimulationId]) { + if (state.currentSimulationId !== '-1' && state.objects.simulation[state.currentSimulationId]) { simulationName = state.objects.simulation[state.currentSimulationId].name } return { - topologyIsLoading: state.currentTopologyId === -1, + topologyIsLoading: state.currentTopologyId === '-1', simulationName, } } diff --git a/frontend/src/pages/Experiments.js b/frontend/src/pages/Experiments.js index 97e63f44..43bd15be 100644 --- a/frontend/src/pages/Experiments.js +++ b/frontend/src/pages/Experiments.js @@ -44,7 +44,7 @@ class ExperimentsComponent extends React.Component { const mapStateToProps = (state) => { let simulationName = undefined - if (state.currentSimulationId !== -1 && state.objects.simulation[state.currentSimulationId]) { + if (state.currentSimulationId !== '-1' && state.objects.simulation[state.currentSimulationId]) { simulationName = state.objects.simulation[state.currentSimulationId].name } -- cgit v1.2.3