🐛 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 ;; Check if the shape is an instance whose master is defined in a
;; library that is not linked to the current file ;; library that is not linked to the current file
(foreign-instance? [shape paste-objects state] (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)] root-file-id (:component-file root)]
(and (some? root) (and (some? root)
(not= root-file-id (:current-file-id state)) (not= root-file-id (:current-file-id state))