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