Skip to content

Commit 2280159

Browse files
authored
fix: artifacts key in object does not have messages property, which g… (#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.
1 parent 7aead83 commit 2280159

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/ui/src/ui-component/dialog/ViewMessagesDialog.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ const ViewMessagesDialog = ({ show, dialogProps, onCancel }) => {
337337
if (chatmsg.feedback) msg.feedback = chatmsg.feedback?.content
338338
if (chatmsg.agentReasoning) msg.agentReasoning = chatmsg.agentReasoning
339339
if (chatmsg.artifacts) {
340-
obj.artifacts = chatmsg.artifacts
341-
obj.artifacts.forEach((artifact) => {
340+
msg.artifacts = chatmsg.artifacts
341+
msg.artifacts.forEach((artifact) => {
342342
if (artifact.type === 'png' || artifact.type === 'jpeg') {
343343
artifact.data = `${baseURL}/api/v1/get-upload-file?chatflowId=${chatmsg.chatflowid}&chatId=${
344344
chatmsg.chatId

0 commit comments

Comments
 (0)