fix data sharing race condition

This commit is contained in:
Matt Walsh
2020-10-20 20:04:51 -05:00
parent c4e8ef6a14
commit 98e01688ae
8 changed files with 285 additions and 8 deletions

View File

@@ -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;