mirror of
https://github.com/penpot/penpot.git
synced 2025-01-21 06:02:32 -05:00
🐛 Fix validation error when adding a shape to a main
This commit is contained in:
parent
f855f9c46d
commit
0dfe231dc3
1 changed files with 7 additions and 3 deletions
|
@ -895,8 +895,10 @@
|
|||
root-main
|
||||
root-instance)]
|
||||
(cond-> new-shape
|
||||
true
|
||||
(assoc :frame-id (:frame-id parent-shape))
|
||||
:always
|
||||
(assoc :frame-id (if (= (:type parent-shape) :frame)
|
||||
(:id parent-shape)
|
||||
(:frame-id parent-shape)))
|
||||
|
||||
(nil? (:shape-ref original-shape))
|
||||
(assoc :shape-ref (:id original-shape))
|
||||
|
@ -988,7 +990,9 @@
|
|||
:obj shape'})
|
||||
|
||||
(ctn/page? component-container)
|
||||
(assoc :frame-id (:frame-id shape')))))
|
||||
(assoc :frame-id (if (= (:type shape') :frame)
|
||||
(:id shape')
|
||||
(:frame-id shape'))))))
|
||||
|
||||
mod-obj-change (fn [changes shape']
|
||||
(update changes :redo-changes conj
|
||||
|
|
Loading…
Add table
Reference in a new issue