Check if js/location exists

This commit is contained in:
Juho Teperi 2018-07-11 09:22:13 +03:00
parent 61a9871ebb
commit 7f1b2ce417

View file

@ -32,7 +32,8 @@
(.getPathPrefix history)
token)))
(def ^:private current-domain (.getDomain (.parse Uri js/location)))
(def ^:private current-domain (if (exists? js/location)
(.getDomain (.parse Uri js/location))))
(defn ignore-anchor-click
"Ignore click events from a elements, if the href points to URL that is part