Remove element shape object from local storage save (#336)

This commit is contained in:
Gasim Gasimzada 2020-01-12 14:08:47 +04:00 committed by Timur Khazamov
parent bc909b76da
commit ba8bc10431

View File

@ -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
}