diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-20 11:04:34 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-09-20 16:07:06 +0200 |
| commit | 0b3d0ba3193ebcdeadc6a4b0a192eeb06e9add29 (patch) | |
| tree | f01e4990efd17b1ab0ed520ec39cd3aa5a0a0b09 /opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js | |
| parent | 98bc4c3e9458aea98890b770493f14327a7bc7c4 (diff) | |
fix(web/ui): Do not fail on stale Redux state
This change fixes an issue where switching between different topologies
would fail due to stale Redux state. We have updated the components to
take into account that ids may not exist in the Redux store.
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js b/opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js index dad2d62d..ed942661 100644 --- a/opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js +++ b/opendc-web/opendc-web-ui/src/components/topologies/map/groups/RackGroup.js @@ -11,8 +11,8 @@ function RackGroup({ tile }) { <Group> <TileObject positionX={tile.positionX} positionY={tile.positionY} color={RACK_BACKGROUND_COLOR} /> <Group> - <RackSpaceFillContainer tileId={tile.id} positionX={tile.positionX} positionY={tile.positionY} /> - <RackEnergyFillContainer tileId={tile.id} positionX={tile.positionX} positionY={tile.positionY} /> + <RackSpaceFillContainer rackId={tile.rack} positionX={tile.positionX} positionY={tile.positionY} /> + <RackEnergyFillContainer rackId={tile.rack} positionX={tile.positionX} positionY={tile.positionY} /> </Group> </Group> ) |
