From e59d106315bb33355bfa878ebb4773d2c7e9a176 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 14 Mar 2023 18:18:23 +0100 Subject: [PATCH] :bug: Fix duplicate component in assets generates wrong main copy --- .../src/app/main/data/workspace/libraries_helpers.cljs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index b3f2a16222..861add6f30 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -122,14 +122,17 @@ position (gpt/add (gpt/point (:x main-instance-shape) (:y main-instance-shape)) (gpt/point (+ (:width main-instance-shape) 50) 0)) + component-instance-extra-data (if components-v2 {:main-instance? true} {}) + [new-instance-shape new-instance-shapes] (when (and (some? main-instance-page) (some? main-instance-shape)) (ctn/make-component-instance main-instance-page component library-data position - true))] - + true + component-instance-extra-data))] + [nil nil new-instance-shape new-instance-shapes]) (let [component-root (d/seek #(nil? (:parent-id %)) (vals (:objects component))) @@ -898,7 +901,7 @@ :index index :ignore-touched true :obj shape'}) - + (ctn/page? component-container) (assoc :frame-id (:frame-id shape')))))