Merge branch 'develop' into bryanzzhu-weather

This commit is contained in:
Michael Teeuw
2020-09-18 12:15:44 +02:00
committed by GitHub
33 changed files with 767 additions and 467 deletions

View File

@@ -76,11 +76,12 @@ Module.register("weather", {
// Override getHeader method.
getHeader: function () {
if (this.config.appendLocationNameToHeader && this.data.header !== undefined && this.weatherProvider) {
return this.data.header + " " + this.weatherProvider.fetchedLocation();
if (this.config.appendLocationNameToHeader && this.weatherProvider) {
if (this.data.header) return this.data.header + " " + this.weatherProvider.fetchedLocation();
else return this.weatherProvider.fetchedLocation();
}
return this.data.header;
return this.data.header ? this.data.header : "";
},
// Start the weather module.