Skip to content

Commit

Permalink
fix: should not hide empty message away (janhq#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Dec 20, 2023
1 parent 88fc071 commit 5a0cec9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions web/screens/Chat/ChatBody/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,8 @@ const ChatBody: React.FC = () => {
<ScrollToBottom className="flex h-full w-full flex-col">
{messages.map((message, index) => (
<>
{message.content.length ? (
<ChatItem {...message} key={message.id} />
) : (
<></>
)}
<ChatItem {...message} key={message.id} />

{message.status === MessageStatus.Error &&
index === messages.length - 1 && (
<div
Expand Down

0 comments on commit 5a0cec9

Please sign in to comment.