summaryrefslogtreecommitdiff
path: root/src/containers/app/map/layers/RoomHoverLayer.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-28 12:47:19 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-28 12:47:19 +0200
commit6eda14819b8c8a67b66eab9e04e82e141093f7da (patch)
treed27841950924cb8fedae06cee4041aaf442ef675 /src/containers/app/map/layers/RoomHoverLayer.js
parent5b6e4a9e9fbbe2bd4555f7d7f193b08150d29344 (diff)
Fix bug with room construction on deleted rooms
Diffstat (limited to 'src/containers/app/map/layers/RoomHoverLayer.js')
-rw-r--r--src/containers/app/map/layers/RoomHoverLayer.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/containers/app/map/layers/RoomHoverLayer.js b/src/containers/app/map/layers/RoomHoverLayer.js
index 801ce549..fbcbed7e 100644
--- a/src/containers/app/map/layers/RoomHoverLayer.js
+++ b/src/containers/app/map/layers/RoomHoverLayer.js
@@ -20,7 +20,7 @@ const mapStateToProps = state => {
const newRoom = Object.assign({}, state.objects.room[state.construction.currentRoomInConstruction]);
const oldRooms = Object.keys(state.objects.room)
.map(id => Object.assign({}, state.objects.room[id]))
- .filter(room => room.datacenterId === state.currentDatacenterId
+ .filter(room => state.objects.datacenter[state.currentDatacenterId].roomIds.indexOf(room.id) !== -1
&& room.id !== state.construction.currentRoomInConstruction);
[...oldRooms, newRoom].forEach(room => {