0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-02 10:01:34 -05:00

Merge pull request #3252 from penpot/niwinz-bugfix-1

🐛 Fix incorrect impl of go-to-main-component
This commit is contained in:
Alejandro 2023-05-26 15:55:51 +02:00 committed by GitHub
commit bd83292a85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1232,13 +1232,12 @@
(if (= file-id current-file-id)
(let [component (dm/get-in state [:workspace-data :components component-id])
page-id (:main-instance-page component)]
(when (some? page-id)
(if (= page-id current-page-id)
(let [shape-id (:main-instance-id component)]
(rx/of (dws/select-shapes (d/ordered-set shape-id))
dwz/zoom-to-selected-shape))
(redirect-to current-page-id page-id))))
(redirect-to current-file-id page-id))))
(let [component (dm/get-in state [:workspace-libraries file-id :data :components component-id])]
(some->> (:main-instance-page component)