diff --git a/app/components/note/Note.tsx b/app/components/note/Note.tsx index 16ae684..c29ff79 100644 --- a/app/components/note/Note.tsx +++ b/app/components/note/Note.tsx @@ -61,30 +61,35 @@ export const Note = ({ note }: NoteProps) => { - {isNonEmptyString(note.postId) && ( - - - - - )} + { + // ref: https://github.com/codeforjapan/BirdXplorer_Viewer/pull/32#discussion_r1978997326 + // API 側で Post 情報を非同期に取得する仕様変更が予定されているが、誤って postId が null になってしまう場合がありえるので + // 予防的に分岐を入れている。Note.postId の存在が保証されている場合は分岐を削除して良い。 + isNonEmptyString(note.postId) && ( + + + + + ) + } );