fix: remove links when duplicating a block

This commit is contained in:
abdou6666 2025-02-16 11:14:41 +01:00
parent 5e6f867e49
commit 71462facb8

View File

@ -203,13 +203,23 @@ const Diagrams = () => {
if (!block) { if (!block) {
return; return;
} }
const {
attachedBlock: _attachedBlock,
nextBlocks: _nextBlocks,
previousBlocks: _previousBlocks,
id: _id,
createdAt: _createdAt,
updatedAt: _updatedAt,
position,
...duplicateBlockDto
} = block;
duplicateBlock({ duplicateBlock({
...block, ...duplicateBlockDto,
name: `${block.name} (Copy)`, name: `${block.name} (Copy)`,
position: { position: {
x: block.position.x + 100, x: position.x + 100,
y: block.position.y + 100, y: position.y + 100,
}, },
}); });
}; };