fix hourly graph not updating close #77

This commit is contained in:
Matt Walsh
2025-05-02 23:22:00 -05:00
parent 91f669e828
commit eacd82b4f4
3 changed files with 17 additions and 5 deletions

View File

@@ -139,6 +139,8 @@ class Hourly extends WeatherDisplay {
// promise allows for data to be requested before it is available
async getCurrentData(stillWaiting) {
if (stillWaiting) this.stillWaitingCallbacks.push(stillWaiting);
// an external caller has requested data, set up auto reload
this.setAutoReload();
return new Promise((resolve) => {
if (this.data) resolve(this.data);
// data not available, put it into the data callback queue