Skip to content

Commit

Permalink
use global location not document.location
Browse files Browse the repository at this point in the history
document.location isn't available in webworkers but location is
  • Loading branch information
thheller committed Jun 10, 2020
1 parent 947d411 commit fb2bb19
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main/shadow/cljs/devtools/client/env.cljs
Expand Up @@ -65,10 +65,9 @@
(defn get-server-host []
(cond
(and use-document-host
js/goog.global.document
js/goog.global.document.location
(seq js/goog.global.document.location.hostname))
js/document.location.hostname
js/goog.global.location
(seq js/goog.global.location.hostname))
js/goog.global.location.hostname

(seq server-host)
server-host
Expand Down

0 comments on commit fb2bb19

Please sign in to comment.