mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
bugfix for duplicated compliments
This commit is contained in:
@@ -99,11 +99,11 @@ Module.register("compliments", {
|
||||
var compliments = null;
|
||||
|
||||
if (hour >= 3 && hour < 12) {
|
||||
compliments = this.config.compliments.morning;
|
||||
compliments = this.config.compliments.morning.slice(0);
|
||||
} else if (hour >= 12 && hour < 17) {
|
||||
compliments = this.config.compliments.afternoon;
|
||||
compliments = this.config.compliments.afternoon.slice(0);
|
||||
} else {
|
||||
compliments = this.config.compliments.evening;
|
||||
compliments = this.config.compliments.evening.slice(0);
|
||||
}
|
||||
|
||||
if (typeof compliments === "undefined") {
|
||||
@@ -117,7 +117,6 @@ Module.register("compliments", {
|
||||
compliments.push.apply(compliments, this.config.compliments.anytime);
|
||||
|
||||
return compliments;
|
||||
|
||||
},
|
||||
|
||||
/* complimentFile(callback)
|
||||
|
Reference in New Issue
Block a user