From 790ce27316bdbb72665a6835d24119860eb98289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Mon, 8 Jan 2024 12:26:07 +0100 Subject: [PATCH] :bug: Enable preprocess always when migrating files --- backend/src/app/features/components_v2.clj | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/src/app/features/components_v2.clj b/backend/src/app/features/components_v2.clj index 3c5d3e5b0..45c196f47 100644 --- a/backend/src/app/features/components_v2.clj +++ b/backend/src/app/features/components_v2.clj @@ -383,12 +383,12 @@ (defn- migrate-components "If there is any component in the file library, add a new 'Library backup', generate main instances for all components there and remove - shapes from library components. Mark the file with - the :components-v2 option." + shapes from library components. Mark the file with the :components-v2 option." [file-data libraries] (sse/tap {:type :migration-progress :section :components}) - (let [components (ctkl/components-seq file-data)] + (let [file-data (prepare-file-data file-data libraries) + components (ctkl/components-seq file-data)] (if (empty? components) (assoc-in file-data [:options :components-v2] true) (let [[file-data page-id start-pos] @@ -503,9 +503,7 @@ (some-> *team-stats* (swap! update :processed/components (fnil + 0) total)) (some-> *file-stats* (swap! assoc :processed/components total))) - (-> file-data - (prepare-file-data libraries) - (add-instance-grids)))))) + (add-instance-grids file-data))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; GRAPHICS MIGRATION