Skip to content

Commit

Permalink
Present errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Aug 2, 2023
1 parent a606cd2 commit a3f6782
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nextjournal/clerk/render/editor.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@
on-eval (fn [^js editor-view]
(.. ((or eval-notebook-fn eval-notebook) (.. editor-view -state -doc toString))
(then (fn [result] (reset! !notebook result)))
(catch (fn [error] (reset! !notebook (v/html [render/error-view error]))))))]
(catch (fn [error]
(reset! !notebook (v/present (v/html [render/error-view error])))))))]
(hooks/use-effect
(fn []
(let [^js view
Expand Down

0 comments on commit a3f6782

Please sign in to comment.