summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js')
-rw-r--r--opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js b/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js
index ef5af263..0788b894 100644
--- a/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js
+++ b/opendc-web/opendc-web-ui/src/components/topologies/map/TileContainer.js
@@ -31,6 +31,10 @@ function TileContainer({ tileId, ...props }) {
const dispatch = useDispatch()
const tile = useSelector((state) => state.topology.tiles[tileId])
+ if (!tile) {
+ return null
+ }
+
const onClick = (tile) => {
if (tile.rack) {
dispatch(goFromRoomToRack(tile.id))