0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-03 04:49:03 -05:00

Merge pull request #3598 from penpot/palba-fix-duplicate-component

🐛 Fix duplicate component doesn't create a main shape
This commit is contained in:
Andrey Antukh 2023-09-05 12:20:34 +02:00 committed by GitHub
commit 2706d1ffd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,10 +132,8 @@
(let [main-instance-page (ctf/get-component-page library-data component)
main-instance-shape (ctf/get-component-root library-data component)
position (gpt/point (:x main-instance-shape) (:y main-instance-shape))
component-instance-extra-data (if components-v2 {:main-instance true} {})
position (gpt/point (:x main-instance-shape) (:y main-instance-shape))
options (if components-v2 {:main-instance? true} {})
[new-instance-shape new-instance-shapes]
(when (and (some? main-instance-page) (some? main-instance-shape))
@ -144,7 +142,7 @@
library-data
position
true
component-instance-extra-data))]
options))]
[nil nil new-instance-shape new-instance-shapes])