mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 23:18:48 -05:00
✨ Make the navigation async by default.
This leaves some time to eventloop to terminate other async events before navigate.
This commit is contained in:
parent
b2dc849e52
commit
cad2b831ed
1 changed files with 7 additions and 6 deletions
|
@ -84,12 +84,13 @@
|
|||
|
||||
ptk/EffectEvent
|
||||
(effect [_ state stream]
|
||||
(let [router (:router state)
|
||||
history (:history state)
|
||||
path (resolve router id params qparams)]
|
||||
(if ^boolean replace
|
||||
(bhistory/replace-token! history path)
|
||||
(bhistory/set-token! history path))))))
|
||||
(ts/asap
|
||||
#(let [router (:router state)
|
||||
history (:history state)
|
||||
path (resolve router id params qparams)]
|
||||
(if ^boolean replace
|
||||
(bhistory/replace-token! history path)
|
||||
(bhistory/set-token! history path)))))))
|
||||
|
||||
(defn nav
|
||||
([id] (nav id nil nil))
|
||||
|
|
Loading…
Add table
Reference in a new issue