remove closures from mutateElement, get rid of the element spreading (#902)

This commit is contained in:
Pete Hunt
2020-03-10 20:11:02 -07:00
committed by GitHub
parent 13b838117c
commit 83a2f5de28
10 changed files with 218 additions and 196 deletions

View File

@ -52,6 +52,7 @@ export function restore(
return {
...element,
version: element.id ? element.version + 1 : element.version || 0,
id: element.id || nanoid(),
fillStyle: element.fillStyle || "hachure",
strokeWidth: element.strokeWidth || 1,