From c25a2961baf6536da3d19b1a207d4903d5517d7d Mon Sep 17 00:00:00 2001 From: todd Date: Wed, 6 Oct 2021 14:27:26 -0700 Subject: [PATCH] fixing compile time error --- routes/weatherProviders/OWM.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/weatherProviders/OWM.ts b/routes/weatherProviders/OWM.ts index 9125cfa..556e871 100644 --- a/routes/weatherProviders/OWM.ts +++ b/routes/weatherProviders/OWM.ts @@ -236,7 +236,7 @@ export default class OWMWeatherProvider extends WeatherProvider { dt_txt: "" }; - if (hourly && hourly.length > 0 && hourly[2]?.dt) { + if (hourly && hourly.length > 2 && hourly[2].dt) { // Could add some more data here if needed, I decided to just minimize the translation work // Also some of the fields aren't availible in the new call so not worth trying to do a full translation