fix view/parse of nil value on error

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Bruce Hauman 2018-10-11 08:52:23 -04:00 committed by Julien Eluard
parent aa755e3c23
commit f1e06113ab
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6

View File

@ -111,8 +111,10 @@
(defn parse [ctx ext o]
(if (list? o) ;; TODO introduce a block? fn
(let [{:keys [data errors] :as m} (blocks/parse ctx ext o)]
;; TODO handle nil data case
(errors/merge-errors (parse ctx ext data) errors))
(errors/merge-errors
(when data
(parse ctx ext data))
errors))
(parse-hiccup-element ctx ext o)))
(defn- inject-properties [m properties]