We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9747eb commit bd1bf20Copy full SHA for bd1bf20
web/src/features/data-centers/DataCenterDetails.tsx
@@ -50,11 +50,11 @@ export default function DataCenterDetails(): JSX.Element {
50
const { estimatedPercentage } = selectedData || {};
51
const roundedEstimatedPercentage = round(estimatedPercentage ?? 0, 0);
52
53
- // Memoize the zone data to prevent unnecessary recalculations
54
- const parentZone = useMemo(
55
- () => getAllZones(i18n.language)[zoneId].displayName,
56
- [zoneId]
57
- );
+ const parentZone =
+ useMemo(
+ () => (zoneId ? getAllZones(i18n.language)[zoneId].displayName : 'parent zone'),
+ [zoneId]
+ ) ?? 'parent zone';
58
59
// Find the matching data center
60
const dataCenterKey = useMemo(() => {
0 commit comments