TypeError: Cannot read properties of null (reading 'profile')
DB article에 created_by.profile: null인 게시물이 있어서 db에 직접 profile을 추가하여 해결했습니다.
2. src/components/PostCommentEditor.vue
TypeError: Cannot read properties of undefined (reading 'profile')
isVerified()에서 post.my_comment_profile이 undefined일 경우 false를 return하도록 변경하였습니다.
또한 post.my_comment_profile이 정의되었다면 post.my_comment_profile.profile 또한 정의되므로 profile 뒤의 Optional chaining operator를 제거하였습니다. 반면 post.parent_board는 undefined일 수 있으므로 Optional chaining operator를 추가하였습니다.
3. src/components/ThePostHeader.vue
TypeError: Cannot read properties of undefined (reading 'slug')
post.parent_board의 slug와 name을 computed 값을 사용하도록 변경하여 해결했습니다.
https://www.notion.so/sparcs/e027e467dcc04d2596d2b0f9bdfaa0d8
1. src/components/SmallBoard.vue
DB article에 created_by.profile: null인 게시물이 있어서 db에 직접 profile을 추가하여 해결했습니다.
2. src/components/PostCommentEditor.vue
isVerified()에서 post.my_comment_profile이 undefined일 경우 false를 return하도록 변경하였습니다.
또한 post.my_comment_profile이 정의되었다면 post.my_comment_profile.profile 또한 정의되므로 profile 뒤의 Optional chaining operator를 제거하였습니다. 반면 post.parent_board는 undefined일 수 있으므로 Optional chaining operator를 추가하였습니다.
3. src/components/ThePostHeader.vue
post.parent_board의 slug와 name을 computed 값을 사용하도록 변경하여 해결했습니다.