diff --git a/src/dompa/nodes.cljc b/src/dompa/nodes.cljc index d2f8e4b..eef65d3 100644 --- a/src/dompa/nodes.cljc +++ b/src/dompa/nodes.cljc @@ -142,11 +142,19 @@ (and (sequential? coll) (> (count coll) 1))) +(defn- empty-seq? + [coll] + (and (sequential? coll) + (empty? coll))) + (defn- nodes-from-opt [opt] (cond (map? opt) opt + (empty-seq? opt) + nil + (list-of-many? opt) {:node/name :<> :node/children opt} diff --git a/test/dompa/nodes_test.cljc b/test/dompa/nodes_test.cljc index 53e502a..b1c7b0f 100644 --- a/test/dompa/nodes_test.cljc +++ b/test/dompa/nodes_test.cljc @@ -31,6 +31,20 @@ (is (= "