fix dom-node? for nil case

This commit is contained in:
Ruslan Prokopchuk 2014-11-23 10:04:01 +03:00
parent cff3369c1b
commit 674fac7d0e

View file

@ -17,7 +17,7 @@
; (-get-virtual-dom [x] spec)) ; (-get-virtual-dom [x] spec))
(defn- dom-node? [x] (defn- dom-node? [x]
(> (.-nodeType x) 0)) (and x (> (.-nodeType x) 0)))
(defn- get-attr [dom-node attr-name] (defn- get-attr [dom-node attr-name]
(when (.-getAttribute dom-node) (when (.-getAttribute dom-node)