Skip to content

Commit

Permalink
Fix the upper limit for greetingNight
Browse files Browse the repository at this point in the history
It's set to < 5, and greetingMorning to > 6. So between 5 and 6am, the
else clause wins and Bento says "Good evening, John!".

Ale spotted this but he won't bother!

Co-authored-by: Ale Navarro Dellà <cm@cubometa.com>
  • Loading branch information
victor-gp and cubometa committed Dec 9, 2022
1 parent 7207bdd commit 60dbb5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/greeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const gree2 = `${CONFIG.greetingMorning}\xa0`;
const gree3 = `${CONFIG.greetingAfternoon}\xa0`;
const gree4 = `${CONFIG.greetingEvening}\xa0`;

if (hour >= 23 || hour < 5) {
if (hour >= 23 || hour < 6) {
document.getElementById('greetings').innerText = gree1 + name;
} else if (hour >= 6 && hour < 12) {
document.getElementById('greetings').innerText = gree2 + name;
Expand Down

0 comments on commit 60dbb5a

Please sign in to comment.