From 6966a1022ca6a081f2ca8ee4398a3e259cc074dc Mon Sep 17 00:00:00 2001 From: "Daniel J. Geiger" <1852529+DanielJGeiger@users.noreply.github.com> Date: Sat, 14 Oct 2023 14:24:05 -0500 Subject: [PATCH] fix: Don't filter `element.subtype` in `restoreElementWithProperties`. Subtypes are dynamically registered and may vary across deployments. --- src/data/restore.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/restore.ts b/src/data/restore.ts index 8a46b37c5..1d2feb1a3 100644 --- a/src/data/restore.ts +++ b/src/data/restore.ts @@ -36,7 +36,6 @@ import { LinearElementEditor } from "../element/linearElementEditor"; import { bumpVersion } from "../element/mutateElement"; import { getUpdatedTimestamp, updateActiveTool } from "../utils"; import { arrayToMap } from "../utils"; -import { isValidSubtype } from "../element/subtypes"; import { MarkOptional, Mutable } from "../utility-types"; import { detectLineHeight, @@ -161,7 +160,7 @@ const restoreElementWithProperties = < locked: element.locked ?? false, }; - if ("subtype" in element && isValidSubtype(element.subtype, base.type)) { + if ("subtype" in element) { base.subtype = element.subtype; } if ("customData" in element) {