From e8c35c2de6a903cd42d34fbbe6d5ea99dea541af Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 31 Jan 2024 18:56:06 +0100 Subject: [PATCH] :bug: Fix invalid shape type `:icon` on comp-v2 migration --- backend/src/app/features/components_v2.clj | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index 72e3fda923..9036d105ff 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -370,6 +370,16 @@ :selrect selrect :points points)) + (and (= :icon (:type shape)) + (grc/valid-rect? (:selrect shape)) + (valid-shape-points? (:points shape))) + (-> shape + (assoc :type :rect) + (dissoc :content) + (dissoc :metadata) + (dissoc :segments) + (dissoc :x1 :y1 :x2 :y2)) + (and (cfh/group-shape? shape) (grc/valid-rect? (:selrect shape)) (not (valid-shape-points? (:points shape))))