mirror of
https://github.com/penpot/penpot.git
synced 2026-09-12 06:58:57 +00:00
🐛 Fix validation error when instantiating a component inside a main
This commit is contained in:
parent
0688f6a4a3
commit
8b18115b54
@ -301,6 +301,9 @@
|
|||||||
(gpt/add orig-pos delta)
|
(gpt/add orig-pos delta)
|
||||||
{:skip-components? true
|
{:skip-components? true
|
||||||
:bottom-frames? true}))
|
:bottom-frames? true}))
|
||||||
|
frame (get-shape container frame-id)
|
||||||
|
component-frame (get-component-shape (:objects container) frame {:allow-main? true})
|
||||||
|
|
||||||
ids-map (volatile! {})
|
ids-map (volatile! {})
|
||||||
|
|
||||||
update-new-shape
|
update-new-shape
|
||||||
@ -339,7 +342,8 @@
|
|||||||
:component-root true
|
:component-root true
|
||||||
:name new-name)
|
: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))))
|
(dissoc :component-root))))
|
||||||
|
|
||||||
[new-shape new-shapes _]
|
[new-shape new-shapes _]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user