Skip to content

Commit d912f92

Browse files
committed
cljs.analyzer/global-ns? should check that x is a symbol first
1 parent b2c223b commit d912f92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/clojure/cljs/analyzer.cljc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2840,8 +2840,9 @@
28402840
(error-message :undeclared-ns {:ns-sym dep :js-provide (name dep)}))))))))))))
28412841

28422842
(defn global-ns? [x]
2843-
(or (= 'js x)
2844-
(= "js" (namespace x))))
2843+
(and (symbol? x)
2844+
(or (= 'js x)
2845+
(= "js" (namespace x)))))
28452846

28462847
(defn missing-use? [lib sym cenv]
28472848
;; ignore globals referred via :refer-global

0 commit comments

Comments
 (0)