0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

🐛 Fix validation error when instantiating a component inside a main

This commit is contained in:
Andrés Moya 2024-01-15 15:28:17 +01:00 committed by Andrés Moya
parent 0688f6a4a3
commit 8b18115b54

View file

@ -301,6 +301,9 @@
(gpt/add orig-pos delta)
{:skip-components? true
:bottom-frames? true}))
frame (get-shape container frame-id)
component-frame (get-component-shape (:objects container) frame {:allow-main? true})
ids-map (volatile! {})
update-new-shape
@ -339,7 +342,8 @@
:component-root true
:name new-name)
(some? (:parent-id original-shape)) ;; On v2 we have removed the parent-id for component roots (see above)
(or (some? (:parent-id original-shape)) ; On v2 we have removed the parent-id for component roots (see above)
(some? component-frame))
(dissoc :component-root))))
[new-shape new-shapes _]