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.
This commit is contained in:
Tomoki Yokoyama
2025-01-07 03:46:12 +09:00
committed by GitHub
parent 7aead83d61
commit 22801591da
@@ -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