mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: strip legacy attrs on element restore (#9318)
This commit is contained in:
parent
0cd5a259ae
commit
d797c2e210
1 changed files with 7 additions and 1 deletions
|
@ -221,7 +221,7 @@ const restoreElementWithProperties = <
|
|||
"customData" in extra ? extra.customData : element.customData;
|
||||
}
|
||||
|
||||
return {
|
||||
const ret = {
|
||||
// spread the original element properties to not lose unknown ones
|
||||
// for forward-compatibility
|
||||
...element,
|
||||
|
@ -230,6 +230,12 @@ const restoreElementWithProperties = <
|
|||
...getNormalizedDimensions(base),
|
||||
...extra,
|
||||
} as unknown as T;
|
||||
|
||||
// strip legacy props (migrated in previous steps)
|
||||
delete ret.strokeSharpness;
|
||||
delete ret.boundElementIds;
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
const restoreElement = (
|
||||
|
|
Loading…
Add table
Reference in a new issue