use locally stored weather parameters in spc outlook close #150
This commit is contained in:
parent
64d6484bd8
commit
77838e1a81
1 changed files with 2 additions and 1 deletions
|
|
@ -57,6 +57,7 @@ class SpcOutlook extends WeatherDisplay {
|
|||
}
|
||||
|
||||
async getData(weatherParameters, refresh) {
|
||||
if (weatherParameters) this.weatherParameters = weatherParameters;
|
||||
if (!super.getData(weatherParameters, refresh)) return;
|
||||
|
||||
// SPC outlook data does not need to be reloaded on a location change, only during silent refresh
|
||||
|
|
@ -93,7 +94,7 @@ class SpcOutlook extends WeatherDisplay {
|
|||
}
|
||||
}
|
||||
// parse the data
|
||||
this.data = testAllPoints([weatherParameters.longitude, weatherParameters.latitude], this.rawOutlookData);
|
||||
this.data = testAllPoints([this.weatherParameters.longitude, this.weatherParameters.latitude], this.rawOutlookData);
|
||||
|
||||
// check if there's a "risk" for any of the three days, otherwise skip the SPC Outlook screen
|
||||
if (this.data.reduce((prev, cur) => prev || !!cur, false)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue