Read the statement by Michael Teeuw here.
MMM-compliment showing evening compliment anytime
-
@sdetweil Yes ! Problem found…
Step by step, i’ve understandif (hour >= this.config.morningStartTime && hour < this.config.morningEndTime && this.config.compliments.hasOwnProperty("morning")) { compliments = this.config.compliments.morning.slice(0); } else if (hour >= this.config.afternoonStartTime && hour < this.config.afternoonEndTime && this.config.compliments.hasOwnProperty("afternoon")) { compliments = this.config.compliments.afternoon.slice(0); } else if (this.config.compliments.hasOwnProperty("evening")) { compliments = this.config.compliments.evening.slice(0); }
The JS need to have a “morning” and “afternoon” compliments define, else it choosing “evening” by default if define.
My problem was i don’t had afternoon compliment define…but i’ve evening one.
Thank you very much for your time and your time :) It was very helpful.
-
@selyjohns awesome…
I assume that if u don’t have any entries, you would still leave the list
afternoon: [],
-
@sdetweil sorry i don’t uderstand what you mean ?
I think it works if afternoon is present but empty -
@selyjohns said in MMM-compliment showing evening compliment anytime:
I think it works if afternoon is present but empty
thats what I meant
-
@sdetweil good :)
Ok so thank you for your help. Maybe it need to be more explicit on documentation.And they are confusion between compliments and MMM-compliments
I will now close this case.
Have a good day