From dda527ec385388edbd7023515f8dc869d4094dd1 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Tue, 15 Oct 2013 06:41:35 +0200 Subject: [PATCH] Fix "function sometimes returns no value"-issue --- src/extension.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension.js b/src/extension.js index 4e490e9..fe2a383 100644 --- a/src/extension.js +++ b/src/extension.js @@ -581,7 +581,7 @@ const WeatherMenuButton = new Lang.Class({ if(typeof city == "object" && typeof city.results == "object") city = city.results.place; else - return 0; + return; let cityText = city.woeid+">"+city.name; if(city.admin1) cityText += ", "+city.admin1.content; @@ -997,7 +997,7 @@ const WeatherMenuButton = new Lang.Class({ if(!message.response_body.data) { fun.call(here,0); - return 0; + return; } try @@ -1008,7 +1008,7 @@ const WeatherMenuButton = new Lang.Class({ catch(e) { fun.call(here,0); - return 0; + return; } }); return 0;