Closed DrEpico closed 2 months ago
FIX:
To ensure that the append functions only run after getLocation and getWeather have successfully fetched the data, these append functions should be called inside the getLocation function. This way, they will be executed only after the data is available.
Refactor:
Ensure getLocation and getWeather fetch and store the weather data properly.
Only call the append functions after the data is fetched and ready.
I can't think of a way to call functions to append weather data wihtout getting the error.
getLocation gets location and calls getWeather, it all works and fetch data. However when I try to use any of the "append" functions it starts running into problems.
![image](https://github.com/DrEpico/weather-app/assets/76069708/25686cf2-b835-45f8-9bd5-7873f8d331f5)