mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-20 20:55:06 +01:00
fix: strip legacy attrs on element restore (#9318)
This commit is contained in:
@@ -221,7 +221,7 @@ const restoreElementWithProperties = <
|
|||||||
"customData" in extra ? extra.customData : element.customData;
|
"customData" in extra ? extra.customData : element.customData;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
const ret = {
|
||||||
// spread the original element properties to not lose unknown ones
|
// spread the original element properties to not lose unknown ones
|
||||||
// for forward-compatibility
|
// for forward-compatibility
|
||||||
...element,
|
...element,
|
||||||
@@ -230,6 +230,12 @@ const restoreElementWithProperties = <
|
|||||||
...getNormalizedDimensions(base),
|
...getNormalizedDimensions(base),
|
||||||
...extra,
|
...extra,
|
||||||
} as unknown as T;
|
} as unknown as T;
|
||||||
|
|
||||||
|
// strip legacy props (migrated in previous steps)
|
||||||
|
delete ret.strokeSharpness;
|
||||||
|
delete ret.boundElementIds;
|
||||||
|
|
||||||
|
return ret;
|
||||||
};
|
};
|
||||||
|
|
||||||
const restoreElement = (
|
const restoreElement = (
|
||||||
|
|||||||
Reference in New Issue
Block a user