Skip to content

Commit 80c77a2

Browse files
author
dnolen
committed
exists? should ignore js/
1 parent cae4792 commit 80c77a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/clojure/cljs/core.cljc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@
965965
"Return true if argument exists, analogous to usage of typeof operator
966966
in JavaScript."
967967
[x]
968-
(let [x (:name (cljs.analyzer/resolve-var &env x))
968+
(let [x (cond-> (:name (cljs.analyzer/resolve-var &env x))
969+
(= "js" (namespace x)) name)
969970
segs (string/split (core/str (string/replace x #"\/" ".")) #"\.")
970971
n (count segs)
971972
syms (map

0 commit comments

Comments
 (0)