summaryrefslogtreecommitdiff
path: root/frontend/src/reducers/current-ids.js
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/reducers/current-ids.js
parent39277c91281dbc7bd40bdffabc5b5675e9ede483 (diff)
Fix integer IDs and topology deletion
Diffstat (limited to 'frontend/src/reducers/current-ids.js')
-rw-r--r--frontend/src/reducers/current-ids.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/frontend/src/reducers/current-ids.js b/frontend/src/reducers/current-ids.js
index 76ae67c7..b80d2ecf 100644
--- a/frontend/src/reducers/current-ids.js
+++ b/frontend/src/reducers/current-ids.js
@@ -2,18 +2,18 @@ import { OPEN_EXPERIMENT_SUCCEEDED } from '../actions/experiments'
import { OPEN_SIMULATION_SUCCEEDED } from '../actions/simulations'
import { RESET_CURRENT_TOPOLOGY, SET_CURRENT_TOPOLOGY } from '../actions/topology/building'
-export function currentTopologyId(state = -1, action) {
+export function currentTopologyId(state = '-1', action) {
switch (action.type) {
case SET_CURRENT_TOPOLOGY:
return action.topologyId
case RESET_CURRENT_TOPOLOGY:
- return -1
+ return '-1'
default:
return state
}
}
-export function currentSimulationId(state = -1, action) {
+export function currentSimulationId(state = '-1', action) {
switch (action.type) {
case OPEN_SIMULATION_SUCCEEDED:
return action.id