From bd1a681e71dc73dd1691e946dd766b0288d7aa93 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Tue, 5 Sep 2023 11:18:49 +0200 Subject: [PATCH] :bug: Fix duplicate component doesn't create a main shape --- .../src/app/main/data/workspace/libraries_helpers.cljs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/main/data/workspace/libraries_helpers.cljs b/frontend/src/app/main/data/workspace/libraries_helpers.cljs index 714d0db65..e87b8c6e9 100644 --- a/frontend/src/app/main/data/workspace/libraries_helpers.cljs +++ b/frontend/src/app/main/data/workspace/libraries_helpers.cljs @@ -132,10 +132,8 @@ (let [main-instance-page (ctf/get-component-page library-data component) main-instance-shape (ctf/get-component-root library-data component) - - position (gpt/point (:x main-instance-shape) (:y main-instance-shape)) - - component-instance-extra-data (if components-v2 {:main-instance true} {}) + position (gpt/point (:x main-instance-shape) (:y main-instance-shape)) + options (if components-v2 {:main-instance? true} {}) [new-instance-shape new-instance-shapes] (when (and (some? main-instance-page) (some? main-instance-shape)) @@ -144,7 +142,7 @@ library-data position true - component-instance-extra-data))] + options))] [nil nil new-instance-shape new-instance-shapes])