Skip to content

Commit 601e1fe

Browse files
author
dnolen
committed
eval hack is only required in Node.js + :simple because of modules
1 parent 33db236 commit 601e1fe

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/cljs/cljs/core.cljs

+6-6
Original file line numberDiff line numberDiff line change
@@ -10104,12 +10104,12 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
1010410104
(defn find-ns-obj [ns]
1010510105
(let [munged-ns (munge (str ns))
1010610106
segs (.split munged-ns ".")]
10107-
(if ^boolean js/COMPILED
10108-
(js/eval munged-ns)
10109-
(case *target*
10110-
"nodejs" (find-ns-obj* js/global segs)
10111-
"default" (find-ns-obj* js/window segs)
10112-
(throw (js/Error. (str "find-ns-obj not supported for target " *target*)))))))
10107+
(case *target*
10108+
"nodejs" (if ^boolean js/COMPILED
10109+
(js/eval munged-ns)
10110+
(find-ns-obj* js/global segs))
10111+
"default" (find-ns-obj* js/window segs)
10112+
(throw (js/Error. (str "find-ns-obj not supported for target " *target*))))))
1011310113

1011410114
(defn ns-interns* [sym]
1011510115
(let [ns-obj (find-ns-obj sym)

0 commit comments

Comments
 (0)