Skip to content

Commit

Permalink
[fix] Check for undefined in noContentError incorrectly (#768)
Browse files Browse the repository at this point in the history
Co-authored-by: Ian Seabock (Centific Technologies Inc) <[email protected]>
  • Loading branch information
iseabock and Ian Seabock (Centific Technologies Inc) authored Apr 9, 2024
1 parent ee70ad0 commit 62753bb
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 46 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ const Chat = () => {
}
const noContentError = appStateContext.state.currentChat.messages.find(m => m.role === ERROR)

if (noContentError && !noContentError.content.includes(NO_CONTENT_ERROR)) {
if (!noContentError?.content.includes(NO_CONTENT_ERROR)) {
saveToDB(appStateContext.state.currentChat.messages, appStateContext.state.currentChat.id)
.then((res) => {
if (!res.ok) {
Expand Down
Loading

0 comments on commit 62753bb

Please sign in to comment.