My daily note has this code (below). I borrowed it here on the forum, I don’t know how to write it myself yet. Every time you open a note, an image appears, but then for some reason disappears. When switching the editor mode (in any direction), it appears again. Why is this code unstable? What am I doing wrong?
```dataviewjs
const currentHour = moment().format('HH');
console.log(currentHour)
let greeting;
if (currentHour >= 18 || currentHour < 5) {
greeting = '🌙 Good evening <br> ![[image1.jpg]]'
} else if (currentHour >= 5 && currentHour < 12) {
greeting = '🌞 Good morning! <br> ![[image2.jpg]]'
} else {
greeting = '🌤️ Good afternoon! <br> ![[image3.jpg]]'
}
dv.header(3, greeting)
### What I'm trying to do
<!-- THIS PART WON'T BE POSTED
Please describe what you're trying to accomplish so the community can better help you. Sometimes the solution you have in mind is not necessarily the best option, in which case knowing some background info can let others come up with creative solutions for your use case.
Please continue below this line. -->