mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge pull request #1625 from qistoph/fix_weather_title
Update current weather header only if not undefined
This commit is contained in:
commit
7caeae61f5
@ -71,7 +71,7 @@ Module.register("currentweather",{
|
|||||||
firstEvent: false,
|
firstEvent: false,
|
||||||
|
|
||||||
// create a variable to hold the location name based on the API result.
|
// create a variable to hold the location name based on the API result.
|
||||||
fetchedLocatioName: "",
|
fetchedLocationName: "",
|
||||||
|
|
||||||
// Define required scripts.
|
// Define required scripts.
|
||||||
getScripts: function() {
|
getScripts: function() {
|
||||||
@ -265,8 +265,8 @@ Module.register("currentweather",{
|
|||||||
|
|
||||||
// Override getHeader method.
|
// Override getHeader method.
|
||||||
getHeader: function() {
|
getHeader: function() {
|
||||||
if (this.config.appendLocationNameToHeader) {
|
if (this.config.appendLocationNameToHeader && this.data.header !== undefined) {
|
||||||
return this.data.header + " " + this.fetchedLocatioName;
|
return this.data.header + " " + this.fetchedLocationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.data.header;
|
return this.data.header;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user