summaryrefslogtreecommitdiff
path: root/frontend/src/pages
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 11:46:29 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:22 +0200
commit52865c97f820b883977179930ce4961abdb39c12 (patch)
tree6b429d80694d7e5729fb1f41ff8f9ba4b2d07d4b /frontend/src/pages
parent39277c91281dbc7bd40bdffabc5b5675e9ede483 (diff)
Fix integer IDs and topology deletion
Diffstat (limited to 'frontend/src/pages')
-rw-r--r--frontend/src/pages/App.js4
-rw-r--r--frontend/src/pages/Experiments.js2
2 files changed, 3 insertions, 3 deletions
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
}