Skip to content

Commit 438437f

Browse files
committed
fix type error
1 parent d9747eb commit 438437f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

web/src/features/data-centers/DataCenterDetails.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ export default function DataCenterDetails(): JSX.Element {
5050
const { estimatedPercentage } = selectedData || {};
5151
const roundedEstimatedPercentage = round(estimatedPercentage ?? 0, 0);
5252

53-
// Memoize the zone data to prevent unnecessary recalculations
5453
const parentZone = useMemo(
55-
() => getAllZones(i18n.language)[zoneId].displayName,
54+
() => (zoneId ? getAllZones(i18n.language)[zoneId].displayName : 'parent zone'),
5655
[zoneId]
5756
);
5857

0 commit comments

Comments
 (0)