fix: incorrectly duplicating items on paste/library insert (#6467

* fix: incorrectly duplicating items on paste/library insert

* fix: deduplicate element ids on restore

* tests
This commit is contained in:
David Luzar 2023-04-16 17:22:16 +02:00 committed by GitHub
parent e7e54814e7
commit f640ddc2aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 153 additions and 43 deletions

View file

@ -211,7 +211,10 @@ export class API {
type,
startArrowhead: null,
endArrowhead: null,
points: rest.points ?? [],
points: rest.points ?? [
[0, 0],
[100, 100],
],
});
break;
case "image":