Remove element shape object from local storage save (#336)
This commit is contained in:
parent
bc909b76da
commit
ba8bc10431
@ -187,7 +187,9 @@ export function restoreFromLocalStorage() {
|
|||||||
let elements = [];
|
let elements = [];
|
||||||
if (savedElements) {
|
if (savedElements) {
|
||||||
try {
|
try {
|
||||||
elements = JSON.parse(savedElements);
|
elements = JSON.parse(savedElements).map(
|
||||||
|
({ shape, ...element }: ExcalidrawElement) => element
|
||||||
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Do nothing because elements array is already empty
|
// Do nothing because elements array is already empty
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user