mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-07-05 15:17:49 +00:00
bugfix for duplicated compliments
This commit is contained in:
parent
efb592dce5
commit
581af762f9
@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
- Fix instruction in README for using automatically installer script.
|
||||
- Bug of duplicated compliments as described in [here](https://forum.magicmirror.builders/topic/2381/compliments-module-stops-cycling-compliments).
|
||||
|
||||
## [2.1.1] - 2017-04-01
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user