강의

멘토링

커뮤니티

Inflearn Community Q&A

hollis9797's profile image
hollis9797

asked

MERN STACK Community: React from Start to Deployment

Post-User: Link post information and member information

Post-User 게시글 정보와 회원정보 연동하기 오류

Written on

·

349

1

스크린샷 2022-10-23 오후 5.27.44.png

console.log 에서는 postInfo 정보를 author까지 잘 가져옵니다. 그러나

스크린샷 2022-10-23 오후 5.28.57.png강의 영상대로 postInfo 에서 author 로 접근했을 경우

스크린샷 2022-10-23 오후 5.29.03.png

이런식으로 에러가는 현상이있어서 질문드립니다.

강의영상이랑은 똑같이 작성했는데 여기서 에러가 나서

user.uid === postInfo.author.uid 

접근을 못하고 있습니다.

expressmongodbreactfirebasenodejs

Answer 1

1

hollis9797님의 프로필 이미지
hollis9797
Questioner

옵셔널 체이닝으로 걸어서

postInfo.author?.displayName 으로 해결했습니다.

hollis9797's profile image
hollis9797

asked

Ask a question