0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-02 12:28:54 -05:00

🐛 Fix restore remote component

This commit is contained in:
Andrés Moya 2023-06-21 17:04:11 +02:00
parent 1b0848389c
commit e8dde477a5

View file

@ -464,14 +464,13 @@
(update-in [parent-id :shapes]
#(conj % (:id shape))))
;; Adds a resize-parents operation so the groups are updated. We add all the new objects
new-objects-ids (->> changes :redo-changes (filter #(= (:type %) :add-obj)) (mapv :id))
changes (-> changes
(pcb/with-objects objects)
(pcb/resize-parents new-objects-ids))]
(rx/of (dch/commit-changes changes))))))
(rx/of (dch/commit-changes (assoc changes :file-id library-id)))))))
(defn instantiate-component
"Create a new shape in the current page, from the component with the given id
@ -480,7 +479,6 @@
(dm/assert! (uuid? file-id))
(dm/assert! (uuid? component-id))
(dm/assert! (gpt/point? position))
(ptk/reify ::instantiate-component
ptk/WatchEvent
(watch [it state _]