mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -05:00
🐛 Fix validation error when instantiating a component inside a main
This commit is contained in:
parent
0688f6a4a3
commit
8b18115b54
1 changed files with 5 additions and 1 deletions
|
@ -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 _]
|
||||
|
|
Loading…
Add table
Reference in a new issue