From 4ac2a64a2aaf77a62bcab16411a7aa5045fce340 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 21 Sep 2023 12:00:57 +0200 Subject: [PATCH] :bug: Fix when duplicating a main component all internal shapes are marked as :main-instance --- common/src/app/common/types/container.cljc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/types/container.cljc b/common/src/app/common/types/container.cljc index fdd7b100d..ef7bc7657 100644 --- a/common/src/app/common/types/container.cljc +++ b/common/src/app/common/types/container.cljc @@ -269,7 +269,8 @@ update-new-shape (fn [new-shape original-shape] - (let [new-name (:name new-shape)] + (let [new-name (:name new-shape) + main-instance? (and main-instance? (ctk/instance-root? new-shape))] ; Only the instance root can be a main instance (when (nil? (:parent-id original-shape)) (vswap! unames conj new-name))