mirror of
https://github.com/metosin/reitit.git
synced 2025-12-31 21:58:25 +00:00
Pass uri fragments to history pushState
This commit is contained in:
parent
c829504b59
commit
35597aadf6
1 changed files with 4 additions and 2 deletions
|
|
@ -101,8 +101,10 @@
|
|||
(reitit/match-by-path router (.getPath uri)))
|
||||
(.preventDefault e)
|
||||
(let [path (str (.getPath uri)
|
||||
(if (seq (.getQuery uri))
|
||||
(str "?" (.getQuery uri))))]
|
||||
(when (.hasQuery uri)
|
||||
(str "?" (.getQuery uri)))
|
||||
(when (.hasFragment uri)
|
||||
(str "#" (.getFragment uri))))]
|
||||
(.pushState js/window.history nil "" path)
|
||||
(-on-navigate this path))))))]
|
||||
(-on-navigate this (-get-path this))
|
||||
|
|
|
|||
Loading…
Reference in a new issue