From 7f1b2ce417b32ee925fa940a8a4d35535603c48a Mon Sep 17 00:00:00 2001 From: Juho Teperi Date: Wed, 11 Jul 2018 09:22:13 +0300 Subject: [PATCH] Check if js/location exists --- modules/reitit-frontend/src/reitit/frontend/history.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/reitit-frontend/src/reitit/frontend/history.cljs b/modules/reitit-frontend/src/reitit/frontend/history.cljs index e451d212..5bcbf9d7 100644 --- a/modules/reitit-frontend/src/reitit/frontend/history.cljs +++ b/modules/reitit-frontend/src/reitit/frontend/history.cljs @@ -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