From 9bad9b8e918d6f2ee2dfc4d3173730733c6993c8 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Wed, 21 May 2025 10:05:22 +0200 Subject: [PATCH] :bug: Fix restore component when its original parent is deleted (#6517) --- common/src/app/common/logic/libraries.cljc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/app/common/logic/libraries.cljc b/common/src/app/common/logic/libraries.cljc index 3ae105de39..ee6ba58fff 100644 --- a/common/src/app/common/logic/libraries.cljc +++ b/common/src/app/common/logic/libraries.cljc @@ -2055,7 +2055,7 @@ (pcb/with-objects objects) (pcb/resize-parents new-objects-ids) ;; Fix the order of the children inside the parent - (pcb/reorder-children parent-id (get-in objects [parent-id :shapes])))] + (cond-> parent-id (pcb/reorder-children parent-id (get-in objects [parent-id :shapes]))))] (assoc changes :file-id library-id))) (defn generate-detach-component