From 979041ee91e0690f0dfacb7000a1ab02413c427d Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Fri, 29 Mar 2019 13:13:56 +0100 Subject: [PATCH 1/2] Fix typo in variable name fetchedLocationName --- modules/default/currentweather/currentweather.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 2a6d24b9..8bca45be 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -71,7 +71,7 @@ Module.register("currentweather",{ firstEvent: false, // create a variable to hold the location name based on the API result. - fetchedLocatioName: "", + fetchedLocationName: "", // Define required scripts. getScripts: function() { @@ -266,7 +266,7 @@ Module.register("currentweather",{ // Override getHeader method. getHeader: function() { if (this.config.appendLocationNameToHeader) { - return this.data.header + " " + this.fetchedLocatioName; + return this.data.header + " " + this.fetchedLocationName; } return this.data.header; From 416ace4c863a06ce31803490d71bea124b7ec343 Mon Sep 17 00:00:00 2001 From: Chris van Marle Date: Fri, 29 Mar 2019 13:15:58 +0100 Subject: [PATCH 2/2] Update current weather header only if not undefined --- modules/default/currentweather/currentweather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 8bca45be..2ccc23b7 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -265,7 +265,7 @@ Module.register("currentweather",{ // Override getHeader method. getHeader: function() { - if (this.config.appendLocationNameToHeader) { + if (this.config.appendLocationNameToHeader && this.data.header !== undefined) { return this.data.header + " " + this.fetchedLocationName; }