mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-19 15:31:04 +02:00
fix: Don't filter element.subtype
in restoreElementWithProperties
.
Subtypes are dynamically registered and may vary across deployments.
This commit is contained in:
@@ -36,7 +36,6 @@ import { LinearElementEditor } from "../element/linearElementEditor";
|
|||||||
import { bumpVersion } from "../element/mutateElement";
|
import { bumpVersion } from "../element/mutateElement";
|
||||||
import { getUpdatedTimestamp, updateActiveTool } from "../utils";
|
import { getUpdatedTimestamp, updateActiveTool } from "../utils";
|
||||||
import { arrayToMap } from "../utils";
|
import { arrayToMap } from "../utils";
|
||||||
import { isValidSubtype } from "../element/subtypes";
|
|
||||||
import { MarkOptional, Mutable } from "../utility-types";
|
import { MarkOptional, Mutable } from "../utility-types";
|
||||||
import {
|
import {
|
||||||
detectLineHeight,
|
detectLineHeight,
|
||||||
@@ -161,7 +160,7 @@ const restoreElementWithProperties = <
|
|||||||
locked: element.locked ?? false,
|
locked: element.locked ?? false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if ("subtype" in element && isValidSubtype(element.subtype, base.type)) {
|
if ("subtype" in element) {
|
||||||
base.subtype = element.subtype;
|
base.subtype = element.subtype;
|
||||||
}
|
}
|
||||||
if ("customData" in element) {
|
if ("customData" in element) {
|
||||||
|
Reference in New Issue
Block a user