From e4e566240feffa797daa4471a863814844183dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 29 Jan 2024 09:54:13 +0100 Subject: [PATCH] :bug: Add fix for removing v2 remains in v1 files --- backend/src/app/features/components_v2.clj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index 36d9f3dba7..ab0ac200dd 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -302,9 +302,15 @@ 0 gap))) + ;; Fix name if missing (nil? (:name shape)) (assoc :name (d/name (:type shape))) + ;; Remove v2 info from components that have been copied and pasted + ;; from a v2 file + (some? (:main-instance shape)) + (dissoc shape :main-instance) + ;; Fix broken fills (seq (:fills shape)) (update :fills (fn [fills] (filterv valid-fill? fills)))