From 5fab1adc98a4c1da98a7f61fe774036834990f8f Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Sun, 3 Mar 2019 16:13:20 -0600 Subject: [PATCH] Handle when no list data is provided in OWM reply --- routes/weather.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/routes/weather.js b/routes/weather.js index bbbb451..714b6f6 100755 --- a/routes/weather.js +++ b/routes/weather.js @@ -58,6 +58,11 @@ function getOWMWeatherData( location, callback ) { return; } + if ( !weather.list ) { + callback(weather); + return; + } + var maxCount = 10; weather.temp = 0; weather.humidity = 0;