Virtual whiteboard for sketching hand-drawn like diagrams
filter out selection elements on restore (#901)
David Luzar13b838117ca8
diff --git a/src/data/restore.ts b/src/data/restore.tsindex 950a564704..4ff3765ff0 100644--- a/src/data/restore.ts+++ b/src/data/restore.ts@@ -13,7 +13,11 @@ export function restore(opts?: { scrollToContent: boolean },): DataState {const elements = savedElements- .filter(el => !isInvisiblySmallElement(el))+ .filter(el => {+ // filtering out selection, which is legacy, no longer kept in elements,+ // and causing issues if retained+ return el.type !== "selection" && !isInvisiblySmallElement(el);+ }).map(element => {let points: Point[] = [];if (element.type === "arrow") {