Skip to content

Commit

Permalink
finally fixing the ns eval problem correctly
Browse files Browse the repository at this point in the history
reverting prior changes, I copied this solution from figwheel-repl code
  • Loading branch information
Bruce Hauman committed Aug 12, 2018
1 parent 723f6e8 commit bda2b18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

(defn read-msg [data]
(try
(let [msg (edn/read-string {:readers {'js identity 'object identity}} data)]
(let [msg (edn/read-string data)]
(if (and (map? msg) (:figwheel-event msg)) msg {}))
(catch Exception e
(println "Figwheel: message from client couldn't be read!")
Expand Down
5 changes: 4 additions & 1 deletion support/src/figwheel/client.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@
(let [sb (js/goog.string.StringBuffer.)]
(binding [cljs.core/*print-newline* true
cljs.core/*print-fn* (fn [x] (.append sb x))]
(let [result-value (utils/eval-helper code opts)]
(let [result-value (utils/eval-helper code opts)
result-value (if-not (string? result-value)
(pr-str result-value)
result-value)]
(result-handler
{:status :success
:out (str sb)
Expand Down

0 comments on commit bda2b18

Please sign in to comment.