mirror of
https://github.com/excalidraw/excalidraw.git
synced 2026-11-28 16:19:32 +03:00
Remove element shape object from local storage save (#336)
This commit is contained in:
1 parent
bc909b76da
commit
ba8bc10431
1 file changed
+3
-1
+3
-1
@@ -187,7 +187,9 @@ export function restoreFromLocalStorage() {
|
||||
let elements = [];
|
||||
if (savedElements) {
|
||||
try {
|
||||
elements = JSON.parse(savedElements);
|
||||
elements = JSON.parse(savedElements).map(
|
||||
({ shape, ...element }: ExcalidrawElement) => element
|
||||
);
|
||||
} catch (e) {
|
||||
// Do nothing because elements array is already empty
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user