mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
Remove element shape object from local storage save (#336)
This commit is contained in:
parent
bc909b76da
commit
ba8bc10431
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue