File tree 2 files changed +9
-6
lines changed
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1
- (defproject kibu /pushy " 0.3.1 "
1
+ (defproject kibu /pushy " 0.3.2 "
2
2
:description " HTML5 pushState for Clojurescript"
3
3
:url " https://github.com/kibu-australia/pushy"
4
4
:license {:name " Eclipse Public License"
Original file line number Diff line number Diff line change 90
90
(on-click
91
91
(fn [e]
92
92
(when-let [el (recur-href (-> e .-target))]
93
- (let [href (.-href el)
94
- path (->> href (.parse Uri) .getPath)]
93
+ (let [uri (.parse Uri (.-href el))
94
+ path (.getPath uri)
95
+ query (.getQuery uri)
96
+ ; ; Include query string in token
97
+ next-token (if (empty? query) path (str path " ?" query))]
95
98
; ; Proceed if `identity-fn` returns a value and
96
99
; ; the user did not trigger the event via one of the
97
100
; ; keys we should bypass
98
- (when (and (identity-fn (match-fn path ))
101
+ (when (and (identity-fn (match-fn next-token ))
99
102
; ; Bypass dispatch if any of these keys
100
103
(not (.-altKey e))
101
104
(not (.-ctrlKey e))
107
110
(not= 1 (.-button e)))
108
111
; ; Dispatch!
109
112
(if-let [title (-> el .-title)]
110
- (set-token! this path title)
111
- (set-token! this path ))
113
+ (set-token! this next-token title)
114
+ (set-token! this next-token ))
112
115
(.preventDefault e)))))))
113
116
nil )
114
117
You can’t perform that action at this time.
0 commit comments