Skip to content

Commit

Permalink
debug edn
Browse files Browse the repository at this point in the history
  • Loading branch information
borkdude committed Oct 29, 2024
1 parent ab3c069 commit bee9ad8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/nextjournal/clerk/render.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,12 @@
:status (.-status r)
:headers (.-headers r)})))))
(then read-response+show-progress)
(then (fn [edn] (set-state! {:doc (read-string edn)}) {:ok true}))
(then (fn [edn]
(binding [*print-fn* *print-err-fn*]
(println "EDN!!!!")
(println edn)
(println "---"))
(set-state! {:doc (read-string edn)}) {:ok true}))
(catch (fn [e] (js/console.error "Fetch failed" e)
(set-state! {:doc {:nextjournal/viewer {:render-fn (constantly [:<>])} ;; FIXME: make :error top level on state
:nextjournal/value {:error (viewer/present e)}}})
Expand Down

0 comments on commit bee9ad8

Please sign in to comment.