Skip to content

Commit

Permalink
fix: duplicated error message (janhq#2602)
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan authored Apr 4, 2024
1 parent a484315 commit 931f1da
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions web/screens/Chat/ChatBody/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@ const ChatBody: React.FC = () => {
<ChatItem {...message} key={message.id} />
)}

{loadModelError ? (
<LoadModelError />
) : (
{!loadModelError &&
index === messages.length - 1 &&
message.status !== MessageStatus.Pending &&
message.status !== MessageStatus.Ready && (
<ErrorMessage message={message} />
)
)}
)}
</div>
))}
{loadModelError && <LoadModelError />}
</ScrollToBottom>
)
}
Expand Down

0 comments on commit 931f1da

Please sign in to comment.