Skip to content

Commit

Permalink
fix edge case where evaluating ns forms fails on return value
Browse files Browse the repository at this point in the history
fixes #711
  • Loading branch information
Bruce Hauman committed Aug 12, 2018
1 parent dfd010d commit e0f6c64
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sidecar/src/figwheel_sidecar/components/figwheel_server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@

(defn read-msg [data]
(try
(let [msg (edn/read-string data)]
(let [msg
(binding [*read-eval* false
*default-data-reader-fn* (fn [tag res] res)]
(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

0 comments on commit e0f6c64

Please sign in to comment.