Skip to content

Commit

Permalink
fix: artifacts key in object does not have messages property, which g… (
Browse files Browse the repository at this point in the history
#3812)

fix: artifacts key in object does not have messages property, which gives 'Cannot read properties of undefined (reading reverse) error. So, do not add it to obj variable. Instead, add it to msg object.
  • Loading branch information
tom0k1 authored Jan 6, 2025
1 parent 7aead83 commit 2280159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
if (chatmsg.feedback) msg.feedback = chatmsg.feedback?.content
if (chatmsg.agentReasoning) msg.agentReasoning = chatmsg.agentReasoning
if (chatmsg.artifacts) {
obj.artifacts = chatmsg.artifacts
obj.artifacts.forEach((artifact) => {
msg.artifacts = chatmsg.artifacts
msg.artifacts.forEach((artifact) => {
if (artifact.type === 'png' || artifact.type === 'jpeg') {
artifact.data = `${baseURL}/api/v1/get-upload-file?chatflowId=${chatmsg.chatflowid}&chatId=${
chatmsg.chatId
Expand Down

0 comments on commit 2280159

Please sign in to comment.