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

🐛 Fix paste component to another file

This commit is contained in:
Pablo Alba 2023-05-22 22:07:03 +02:00 committed by Andrés Moya
parent 7d8a62664a
commit 8c915d1687

View file

@ -1680,7 +1680,7 @@
;; Check if the shape is an instance whose master is defined in a
;; library that is not linked to the current file
(foreign-instance? [shape paste-objects state]
(let [root (ctn/get-component-shape paste-objects shape)
(let [root (ctn/get-component-shape paste-objects shape {:allow-main? true})
root-file-id (:component-file root)]
(and (some? root)
(not= root-file-id (:current-file-id state))