Skip to content

Commit

Permalink
Use safe-get to get content-type (#650)
Browse files Browse the repository at this point in the history
Fixes a bug when using sorted sets or maps in the presented results.
  • Loading branch information
borkdude authored Jun 10, 2024
1 parent db38910 commit d3da414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nextjournal/clerk/viewer.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@

#?(:clj
(defn process-blobs [{:as doc+blob-opts :keys [blob-mode blob-id]} presented-result]
(w/postwalk #(if-some [content-type (get % :nextjournal/content-type)]
(w/postwalk #(if-some [content-type (get-safe % :nextjournal/content-type)]
(case blob-mode
:lazy-load (assoc % :nextjournal/value {:blob-id blob-id :path (:path %)})
:inline (update % :nextjournal/value data-uri-base64-encode content-type)
Expand Down

0 comments on commit d3da414

Please sign in to comment.