Fix logic for night greeting

This commit is contained in:
Simeon Widdis 2021-08-15 00:43:53 -06:00
parent b207f51b84
commit 1754470d56

View File

@ -16,7 +16,7 @@ const gree3 = `${CONFIG.greetingAfternoon}\xa0`;
const gree4 = `${CONFIG.greetingEvening}\xa0`; const gree4 = `${CONFIG.greetingEvening}\xa0`;
// Define the hours of the greetings // Define the hours of the greetings
if (hour >= 23 && hour < 5) { if (hour >= 23 || hour < 5) {
document.getElementById('greetings').innerText = gree1 + name; document.getElementById('greetings').innerText = gree1 + name;
} else if (hour >= 6 && hour < 12) { } else if (hour >= 6 && hour < 12) {
document.getElementById('greetings').innerText = gree2 + name; document.getElementById('greetings').innerText = gree2 + name;