The docstring for cljs.js/eval indicates a map (containing either an :error or :value key).
:error
:value
This is the case for :error: Here is an example:
https://github.com/clojure/clojurescript/blob/r1.7.48/src/main/cljs/cljs/js.cljs#L489
But for :value the value is returned without being wrapped in a map; instead the result of applying eval-fn is directly returned (and eval-fn is supposed to return the value). Here is an example:
https://github.com/clojure/clojurescript/blob/r1.7.48/src/main/cljs/cljs/js.cljs#L499
fixed https://github.com/clojure/clojurescript/commit/f7e4c3c0bd0dab6a8f86b279909565d69418eab4
The docstring for cljs.js/eval indicates a map (containing either an
:error
or:value
key).This is the case for
:error
: Here is an example:https://github.com/clojure/clojurescript/blob/r1.7.48/src/main/cljs/cljs/js.cljs#L489
But for
:value
the value is returned without being wrapped in a map; instead the result of applying eval-fn is directly returned (and eval-fn is supposed to return the value). Here is an example:https://github.com/clojure/clojurescript/blob/r1.7.48/src/main/cljs/cljs/js.cljs#L499