0
Fork 0
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:
Andrés Moya 2023-11-14 17:44:28 +01:00 committed by Andrey Antukh
parent f855f9c46d
commit 0dfe231dc3

View file

@ -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