Skip to content

Commit

Permalink
Merge pull request #110 from venus-lion/fe/fix/scroll-bug
Browse files Browse the repository at this point in the history
개인,그룹페이지 메세지 null 체크 추가
  • Loading branch information
minjikimkim2222 authored Feb 6, 2025
2 parents 34366e3 + 12d112a commit 572208c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fe/src/pages/ChatPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function ChatPage({roomId, roomInfo}) {
key={index}
className={`message-group ${isCurrentUser ? 'own-message-group' : ''}`}
>
{!isCurrentUser && receiver && (
{!isCurrentUser && receiver && message && ( // message null 체크
<div className="message-profile-group">
{/* profileImgUrl이 있으면 이미지를 표시하고, 없으면 FaUserCircle 아이콘을 표시합니다. */}
{receiver.profileImgUrl ? (
Expand Down
2 changes: 1 addition & 1 deletion fe/src/pages/ChatPageGroup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function ChatPageGroup({roomId, roomInfo, refreshChatList, refreshChatComponent}
isJoinMessage ? 'join-message-group' : '' // join 메시지에 대한 CSS 클래스 추가
}`}
>
{!isCurrentUser && sender && !isJoinMessage && (
{!isCurrentUser && sender && !isJoinMessage && message ( // message null 체크 추가
<div className="message-profile-group">
{/* profileImgUrl이 있으면 이미지를 표시하고, 없으면 FaUserCircle 아이콘을 표시합니다. */}
{sender && sender.profileImgUrl ? (
Expand Down

0 comments on commit 572208c

Please sign in to comment.