Skip to content

Commit 5c28dd5

Browse files
committed
fix(workflows): only call a message change masked when the message exists on both sides
1 parent 9a18b8e commit 5c28dd5

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/w/components/workflow-diff/components/change-list

‎apps/sim/app/workspace/[workspaceId]/w/components/workflow-diff/components/change-list/field-change-row.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ function MessagesDiff({ oldValue, newValue }: MessagesDiffProps) {
121121
const oldText = toDiffText(slot.old?.content)
122122
const newText = toDiffText(slot.next?.content)
123123
/* The content changed but masking hides where, as with any other field. */
124-
const maskedOnly = oldText === newText && slot.old?.content !== slot.next?.content
124+
const maskedOnly =
125+
Boolean(slot.old && slot.next) &&
126+
oldText === newText &&
127+
slot.old?.content !== slot.next?.content
125128
return { ...slot, oldText, newText, maskedOnly }
126129
})
127130

0 commit comments

Comments
 (0)