summaryrefslogtreecommitdiff
path: root/src/dompa
diff options
context:
space:
mode:
authorAsko Nõmm <asko@nmm.ee>2025-10-19 15:38:55 +0300
committerAsko Nõmm <asko@nmm.ee>2025-10-19 15:38:55 +0300
commite3519291b23972f1857bbee5092ffd34eea6cc71 (patch)
tree21a5baa15b8636c778042001f0fdc21cba1c0f41 /src/dompa
parent3a8a9cf2bc4d775153ce5fd0a00645c49384c46e (diff)
Fix an issue where a sequence of nodes created with the `$` helper would break.
Diffstat (limited to 'src/dompa')
-rw-r--r--src/dompa/nodes.cljc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dompa/nodes.cljc b/src/dompa/nodes.cljc
index 236271d..8600026 100644
--- a/src/dompa/nodes.cljc
+++ b/src/dompa/nodes.cljc
@@ -92,7 +92,7 @@
[name & args-and-elements]
(let [[args & elements] args-and-elements]
`(defn ~name ~args
- (->html [~@elements]))))
+ (->html (vector ~@elements)))))
(defn $
"Creates a new node
@@ -114,4 +114,4 @@
children (if attrs? (rest opts) opts)]
(cond-> {:node/name name}
attrs? (assoc :node/attrs attrs)
- (seq children) (assoc :node/children children)))))
+ (seq children) (assoc :node/children (flatten children))))))