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

Merge pull request #5883 from penpot/niwinz-bugfix-3

🐛 Fix incorrect navigation on show-main-component menu option
This commit is contained in:
Alejandro 2025-02-19 07:42:02 +01:00 committed by GitHub
commit 02f78d80d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -29,7 +29,7 @@
(sm/register! ::component schema:component)
(def check-component!
(def check-component
(sm/check-fn schema:component))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View file

@ -713,8 +713,10 @@
(defn go-to-component-file
[file-id component]
(dm/assert! (uuid? file-id))
(dm/assert! (some? component))
(assert (uuid? file-id) "expected an uuid for `file-id`")
(assert (ctk/check-component component) "expected a valid component")
(ptk/reify ::nav-to-component-file
ptk/WatchEvent
(watch [_ state _]
@ -722,8 +724,7 @@
(assoc :file-id file-id)
(assoc :page-id (:main-instance-page component))
(assoc :component-id (:id component)))]
(rx/of (rt/nav :workspace params :new-window? true))))))
(rx/of (rt/nav :workspace params ::rt/new-window true))))))
(defn go-to-local-component
[& {:keys [id] :as options}]