compliments,js handles remoteFile without default daytimes defined

This commit is contained in:
LAPTOP-KAUR\race2
2017-02-08 02:35:09 +02:00
parent 62e4e13f5a
commit cbafaf5d56
2 changed files with 3 additions and 0 deletions

View File

@@ -107,6 +107,8 @@ Module.register("compliments",{
compliments = this.config.compliments.evening;
}
if (typeof compliments === 'undefined' ) compliments = new Array();
if ( this.currentWeatherType in this.config.compliments) {
compliments.push.apply(compliments, this.config.compliments[this.currentWeatherType]);
}