Skip to content

Commit 9a4e89e

Browse files
mfikesswannodette
authored andcommitted
CLJS-2766: Revisions to exists? fails in self-host
1 parent 72e99c5 commit 9a4e89e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/clojure/cljs/core.cljc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -965,15 +965,15 @@
965965
in JavaScript."
966966
[x]
967967
(if (core/symbol? x)
968-
(let [x (cond-> (:name (cljs.analyzer/resolve-var &env x))
969-
(= "js" (namespace x)) name)
970-
segs (string/split (core/str (string/replace x #"\/" ".")) #"\.")
971-
n (count segs)
972-
syms (map
973-
#(vary-meta (symbol "js" (string/join "." %))
974-
assoc :cljs.analyzer/no-resolve true)
975-
(reverse (take n (iterate butlast segs))))
976-
js (string/join " && " (repeat n "(typeof ~{} !== 'undefined')"))]
968+
(core/let [x (core/cond-> (:name (cljs.analyzer/resolve-var &env x))
969+
(= "js" (namespace x)) name)
970+
segs (string/split (core/str (string/replace (core/str x) "/" ".")) #"\.")
971+
n (count segs)
972+
syms (map
973+
#(vary-meta (symbol "js" (string/join "." %))
974+
assoc :cljs.analyzer/no-resolve true)
975+
(reverse (take n (iterate butlast segs))))
976+
js (string/join " && " (repeat n "(typeof ~{} !== 'undefined')"))]
977977
(bool-expr (concat (core/list 'js* js) syms)))
978978
`(some? ~x)))
979979

0 commit comments

Comments
 (0)