Skip to content

Commit 037340d

Browse files
authored
Merge pull request #4145 from LiteFarmOrg/LF-5253-fix-incorrect-farm-note-read-indicator-flicker-after-clearing
LF-5253 Fix incorrect farm note read indicator flicker after clearing
2 parents 1066ed9 + 03760c4 commit 037340d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • packages/webapp/src/containers/FarmNotes

packages/webapp/src/containers/FarmNotes/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export default function FarmNotes() {
6969
const readUpTo = farmNotesRead?.read_up_to;
7070
const latestOtherUserNote = farmNotes?.find((note) => note.user_id !== userFarm?.user_id);
7171
const hasUnread =
72+
farmNotesRead !== undefined &&
7273
!!latestOtherUserNote &&
7374
(!readUpTo || new Date(latestOtherUserNote.updated_at) > new Date(readUpTo));
7475

0 commit comments

Comments
 (0)