From 77838e1a810882e2bf84ff4a3390597abdf36605 Mon Sep 17 00:00:00 2001 From: Matt Walsh Date: Wed, 15 Oct 2025 00:29:23 +0000 Subject: [PATCH] use locally stored weather parameters in spc outlook close #150 --- server/scripts/modules/spc-outlook.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/scripts/modules/spc-outlook.mjs b/server/scripts/modules/spc-outlook.mjs index 03f799b..b0aad2a 100644 --- a/server/scripts/modules/spc-outlook.mjs +++ b/server/scripts/modules/spc-outlook.mjs @@ -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)) {