mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
add edge case anytime only
This commit is contained in:
parent
581af762f9
commit
778107aae9
@ -98,11 +98,11 @@ Module.register("compliments", {
|
||||
var hour = moment().hour();
|
||||
var compliments = null;
|
||||
|
||||
if (hour >= 3 && hour < 12) {
|
||||
if (hour >= 3 && hour < 12 && this.config.compliments.hasOwnProperty("morning")) {
|
||||
compliments = this.config.compliments.morning.slice(0);
|
||||
} else if (hour >= 12 && hour < 17) {
|
||||
} else if (hour >= 12 && hour < 17 && this.config.compliments.hasOwnProperty("afternoon")) {
|
||||
compliments = this.config.compliments.afternoon.slice(0);
|
||||
} else {
|
||||
} else if(this.config.compliments.hasOwnProperty("evening")) {
|
||||
compliments = this.config.compliments.evening.slice(0);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user