Bug fix
This commit is contained in:
@@ -92,14 +92,16 @@ export function Homepage() {
|
||||
windDirection: 0,
|
||||
pressure: 0,
|
||||
});
|
||||
const extendedForecast = forecast.properties.periods.map((item: ExtendedForecast) => ({
|
||||
const extendedForecast = forecast?.properties?.periods.map(
|
||||
(item: ExtendedForecast) => ({
|
||||
detailedForecast: item.detailedForecast,
|
||||
isDaytime: item.isDaytime,
|
||||
name: item.name,
|
||||
shortForecast: item.shortForecast,
|
||||
temperature: item.temperature,
|
||||
temperatureUnit: item.temperatureUnit,
|
||||
})) || [
|
||||
}),
|
||||
) || [
|
||||
{
|
||||
detailedForecast: '',
|
||||
isDaytime: true,
|
||||
|
||||
Reference in New Issue
Block a user