mirror of
https://github.com/penpot/penpot.git
synced 2025-04-09 21:41:23 -05:00
🐛 Fix incorrect navigation on show-main-component menu option
This commit is contained in:
parent
0900b7a572
commit
0ce99968b3
2 changed files with 6 additions and 5 deletions
|
@ -29,7 +29,7 @@
|
|||
|
||||
(sm/register! ::component schema:component)
|
||||
|
||||
(def check-component!
|
||||
(def check-component
|
||||
(sm/check-fn schema:component))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
@ -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}]
|
||||
|
|
Loading…
Add table
Reference in a new issue