From f566a2adfd4955430824a5cf8e38dfd8b425df71 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 10 Mar 2026 18:06:44 +0000 Subject: [PATCH 1/2] :bug: Fix ITransformable error when path content is a plain vector Coerce content to PathData in transform-content before dispatching the ITransformable protocol, so shapes carrying a plain vector in their :content field (legacy data, bool shapes, SVG imports) no longer crash with 'No protocol method ITransformable.-transform defined for type object'. Signed-off-by: Andrey Antukh --- common/src/app/common/types/path/segment.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/app/common/types/path/segment.cljc b/common/src/app/common/types/path/segment.cljc index fbe90b7c92..8ff37a8e81 100644 --- a/common/src/app/common/types/path/segment.cljc +++ b/common/src/app/common/types/path/segment.cljc @@ -777,7 +777,7 @@ content as PathData instance." [content transform] (if (some? transform) - (impl/-transform content transform) + (impl/-transform (impl/path-data content) transform) content)) (defn move-content From 7939cb045b696ae742bab2b9902f9b3c04637ba3 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 10 Mar 2026 18:24:13 +0000 Subject: [PATCH 2/2] :bug: Fix plain vector leaking into shape :content from shape-to-path conversions group-to-path was storing a raw concatenated vector into :content after flattening children's PathData instances via (map vec). bool-to-path was storing the plain-vector result of bool/calculate-content directly. Both now wrap through path.impl/path-data at the assignment site so the :content invariant (always a PathData instance) is upheld. Signed-off-by: Andrey Antukh --- common/src/app/common/types/path/shape_to_path.cljc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/src/app/common/types/path/shape_to_path.cljc b/common/src/app/common/types/path/shape_to_path.cljc index fc7a07f859..8641ee556e 100644 --- a/common/src/app/common/types/path/shape_to_path.cljc +++ b/common/src/app/common/types/path/shape_to_path.cljc @@ -168,7 +168,7 @@ child-as-paths)] (-> group (assoc :type :path) - (assoc :content content) + (assoc :content (path.impl/path-data content)) (merge head-data) (d/without-keys dissoc-attrs)))) @@ -184,7 +184,8 @@ (:bool-type shape) content - (bool/calculate-content bool-type (map :content children))] + (-> (bool/calculate-content bool-type (map :content children)) + (path.impl/path-data))] (-> shape (assoc :type :path)