Skip to content

Commit

Permalink
eval hack is only required in Node.js + :simple because of modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dnolen committed Jul 31, 2015
1 parent 33db236 commit 601e1fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/cljs/cljs/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -10104,12 +10104,12 @@ Maps become Objects. Arbitrary keys are encoded to by key->js."
(defn find-ns-obj [ns]
(let [munged-ns (munge (str ns))
segs (.split munged-ns ".")]
(if ^boolean js/COMPILED
(js/eval munged-ns)
(case *target*
"nodejs" (find-ns-obj* js/global segs)
"default" (find-ns-obj* js/window segs)
(throw (js/Error. (str "find-ns-obj not supported for target " *target*)))))))
(case *target*
"nodejs" (if ^boolean js/COMPILED
(js/eval munged-ns)
(find-ns-obj* js/global segs))
"default" (find-ns-obj* js/window segs)
(throw (js/Error. (str "find-ns-obj not supported for target " *target*))))))

(defn ns-interns* [sym]
(let [ns-obj (find-ns-obj sym)
Expand Down

0 comments on commit 601e1fe

Please sign in to comment.