We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2fc311b + f7e7d13 commit 33f3119Copy full SHA for 33f3119
src/pushy/core.cljs
@@ -20,7 +20,9 @@
20
(defn- set-retrieve-token! [t]
21
(set! (.. t -retrieveToken)
22
(fn [path-prefix location]
23
- (str (.-pathname location) (.-search location))))
+ (str (.-pathname location)
24
+ (.-search location)
25
+ (.-hash location))))
26
t)
27
28
(defn- set-create-url! [t]
@@ -50,9 +52,11 @@
50
52
51
53
(defn- get-token-from-uri [uri]
54
(let [path (.getPath uri)
- query (.getQuery uri)]
- ;; Include query string in token
55
- (if (empty? query) path (str path "?" query))))
+ query (.getQuery uri)
56
+ fragment (.getFragment uri)]
57
+ (cond-> path
58
+ (seq query) (str "?" query)
59
+ (seq fragment) (str "#" fragment))))
60
61
(defn pushy
62
"Takes in three functions:
0 commit comments