mirror of
https://github.com/penpot/penpot.git
synced 2026-05-23 17:03:41 +00:00
🐛 Fix validation error when adding a shape to a main
This commit is contained in:
parent
f855f9c46d
commit
0dfe231dc3
@ -895,8 +895,10 @@
|
|||||||
root-main
|
root-main
|
||||||
root-instance)]
|
root-instance)]
|
||||||
(cond-> new-shape
|
(cond-> new-shape
|
||||||
true
|
:always
|
||||||
(assoc :frame-id (:frame-id parent-shape))
|
(assoc :frame-id (if (= (:type parent-shape) :frame)
|
||||||
|
(:id parent-shape)
|
||||||
|
(:frame-id parent-shape)))
|
||||||
|
|
||||||
(nil? (:shape-ref original-shape))
|
(nil? (:shape-ref original-shape))
|
||||||
(assoc :shape-ref (:id original-shape))
|
(assoc :shape-ref (:id original-shape))
|
||||||
@ -988,7 +990,9 @@
|
|||||||
:obj shape'})
|
:obj shape'})
|
||||||
|
|
||||||
(ctn/page? component-container)
|
(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']
|
mod-obj-change (fn [changes shape']
|
||||||
(update changes :redo-changes conj
|
(update changes :redo-changes conj
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user