From 20d4c67bf31df55e411c33cca56d7d13e4b369f5 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 30 Nov 2023 07:52:22 +0100 Subject: [PATCH] :bug: Fix importing frame components with fills from V1 to V2 --- backend/src/app/features/components_v2.clj | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index b9579739e..3a41d818a 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -227,11 +227,11 @@ [shape] (if (or (nil? (:parent-id shape)) (ctk/instance-head? shape)) (assoc shape - :type :frame ; Old groups must be converted - :fills [] ; to frames and conform to spec - :hide-in-viewer true - :rx 0 - :ry 0) + :type :frame ; Old groups must be converted + :fills (or (:fills shape) []) ; to frames and conform to spec + :hide-in-viewer (or (:hide-in-viewer shape) true) + :rx (or (:rx shape) 0) + :ry (or (:ry shape) 0)) shape))] (-> file-data (update :pages-index update-vals fix-container) @@ -376,12 +376,7 @@ :main-instance true :component-root true :component-file component-file - :component-id component-id - :type :frame ; Old groups must be converted - :fills [] ; to frames and conform to spec - :hide-in-viewer true - :rx 0 - :ry 0) + :component-id component-id) (nil? (:frame-id shape)) (assoc :frame-id frame-id)