From 7ade96682abe751b13350dcf72578c093d5c853c Mon Sep 17 00:00:00 2001 From: hhack Date: Tue, 28 Nov 2023 12:00:36 +0100 Subject: [PATCH] fix bug when temp is 0 --- src/components/WeatherOverlay/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/components/WeatherOverlay/index.tsx b/src/components/WeatherOverlay/index.tsx index cce9f933..cc9ebf3c 100644 --- a/src/components/WeatherOverlay/index.tsx +++ b/src/components/WeatherOverlay/index.tsx @@ -124,12 +124,13 @@ export const WeatherRow: FC = ({ {ICON_MAPPING[weatherRecords[hour].icon]} )} - {weatherRecords[hour] && weatherRecords[hour].temperature && ( -
- {/* @ts-ignore */} - {Math.round(weatherRecords[hour].temperature)} °C -
- )} + {weatherRecords[hour] && + weatherRecords[hour].temperature !== undefined && ( +
+ {/* @ts-ignore */} + {Math.round(weatherRecords[hour].temperature)} °C +
+ )} ) }