From 3127a020a0aa8f9945a634959ed304bf3cc80970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Thu, 4 Apr 2024 16:45:57 +0200 Subject: [PATCH] :bug: Remove fill from group heads when migrating to v2 --- backend/src/app/features/components_v2.clj | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index 15d5221c8..aa8695ee8 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -872,10 +872,11 @@ (fix-shape [shape] (if (or (nil? (:parent-id shape)) (ctk/instance-head? shape)) - (let [frame? (= :frame (:type shape))] - (assoc shape - :type :frame ; Old groups must be converted - :fills (or (:fills shape) []) ; to frames and conform to spec + (let [frame? (= :frame (:type shape)) + not-group? (not= :group (:type shape))] + (assoc shape ; Old groups must be converted + :type :frame ; to frames and conform to spec + :fills (if not-group? (d/nilv (:fills shape) []) []) ; Groups never should have fill :shapes (or (:shapes shape) []) :hide-in-viewer (if frame? (boolean (:hide-in-viewer shape)) true) :show-content (if frame? (boolean (:show-content shape)) true)