fix for duplicating elements (#261)
This commit is contained in:
@ -32,3 +32,10 @@ export function newElement(
|
||||
};
|
||||
return element;
|
||||
}
|
||||
|
||||
export function duplicateElement(element: ReturnType<typeof newElement>) {
|
||||
const copy = { ...element };
|
||||
copy.id = nanoid();
|
||||
copy.seed = randomSeed();
|
||||
return copy;
|
||||
}
|
||||
|
Reference in New Issue
Block a user