fix data sharing race condition
This commit is contained in:
parent
c4e8ef6a14
commit
98e01688ae
8 changed files with 285 additions and 8 deletions
|
|
@ -58,9 +58,9 @@ const currentWeatherScroll = (() => {
|
|||
drawScreen();
|
||||
};
|
||||
|
||||
const drawScreen = () => {
|
||||
const drawScreen = async () => {
|
||||
// get the conditions
|
||||
const data = navigation.getCurrentWeather();
|
||||
const data = await navigation.getCurrentWeather();
|
||||
|
||||
// nothing to do if there's no data yet
|
||||
if (!data) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue