summaryrefslogtreecommitdiff
path: root/frontend/src/store
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/store')
-rw-r--r--frontend/src/store/middlewares/viewport-adjustment.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/store/middlewares/viewport-adjustment.js b/frontend/src/store/middlewares/viewport-adjustment.js
index ae8f032a..84f2a3e9 100644
--- a/frontend/src/store/middlewares/viewport-adjustment.js
+++ b/frontend/src/store/middlewares/viewport-adjustment.js
@@ -12,20 +12,20 @@ import { calculateRoomListBounds } from '../../util/tile-calculations'
export const viewportAdjustmentMiddleware = store => next => action => {
const state = store.getState()
- let topologyId = -1
+ let topologyId = '-1'
let mapDimensions = {}
- if (action.type === SET_CURRENT_TOPOLOGY && action.topologyId !== -1) {
+ if (action.type === SET_CURRENT_TOPOLOGY && action.topologyId !== '-1') {
topologyId = action.topologyId
mapDimensions = state.map.dimensions
} else if (
action.type === SET_MAP_DIMENSIONS &&
- state.currentTopologyId !== -1
+ state.currentTopologyId !== '-1'
) {
topologyId = state.currentTopologyId
mapDimensions = { width: action.width, height: action.height }
}
- if (topologyId !== -1) {
+ if (topologyId !== '-1') {
const roomIds = state.objects.topology[topologyId].roomIds
const rooms = roomIds.map(id => Object.assign({}, state.objects.room[id]))
rooms.forEach(