Skip to content

Commit

Permalink
fix usage of cons with 1 argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Groshev committed May 22, 2012
1 parent 4e67a41 commit c972b30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cljs/domina.cljs
Expand Up @@ -452,7 +452,7 @@
(nil? list-thing) '()
(dm/satisfies? ISeqable list-thing) (seq list-thing)
(array-like? list-thing) (lazy-nodelist list-thing)
:default (cons list-thing)))
:default (seq [list-thing])))

;;;;;;;;;;;;;;;;;;; Protocol Implementations ;;;;;;;;;;;;;;;;;

Expand All @@ -471,7 +471,7 @@
(nil? content) '()
(dm/satisfies? ISeqable content) (seq content)
(array-like? content) (lazy-nodelist content)
:default (cons content)))
:default (seq [content])))
(single-node [content]
(cond
(nil? content) nil
Expand Down
4 changes: 2 additions & 2 deletions src/cljs/domina/events.cljs
Expand Up @@ -92,7 +92,7 @@

(defn- ancestor-nodes
"Returns a seq of a node and its ancestors, starting with the document root."
([n] (ancestor-nodes n (cons n)))
([n] (ancestor-nodes n [n]))
([n so-far]
(if-let [parent (.-parentNode n)]
(recur parent (cons parent so-far))
Expand Down Expand Up @@ -148,4 +148,4 @@
content of a given type."
[content type]
(let [type (find-builtin-type type)]
(mapcat #(events/getListeners % type false) (domina/nodes content))))
(mapcat #(events/getListeners % type false) (domina/nodes content))))

0 comments on commit c972b30

Please sign in to comment.