mirror of
https://github.com/penpot/penpot.git
synced 2026-09-24 15:48:28 +08: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:
committed by
Alonso Torres
parent
b2dc849e52
commit
cad2b831ed
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user