                  (doto res
                    (aset (cached-prop-name k)
                          (to-js-val v))))
-               (js-obj) val)
+               #js {} val)
     (to-js-val val)))
 
 (defn set-id-class [props [id class]]
-  (aset props "id" (or (aget props "id") id))
-  (when class
-    (aset props "className" (if-let [old (aget props "className")]
-                              (str class " " old)
-                              class))))
+  (let [pid (aget props "id")]
+    (aset props "id" (if-not (nil? pid) pid id))
+    (when-not (nil? class)
+      (aset props "className" (let [old (aget props "className")]
+                                (if-not (nil? old)
+                                  (str class " " old)
+                                  class))))))
 
 (defn convert-props [props id-class]
   (cond


;;; Common utilities

(defn hiccup-tag? [x]
  (or (keyword? x)
      (symbol? x)


(defn vec-to-comp [v level]
  (assert (pos? (count v)) "Hiccup form should not be empty")
  (assert (valid-tag? (nth v 0))
          (str "Invalid Hiccup form: " (pr-str v)))
  (let [c (as-class (nth v 0))
        jsprops (js-obj cljs-argv v
                        cljs-level level)]
    (let [k (-> v meta get-key)
          k' (if (nil? k)
               (-> v (nth 1 nil) get-key)
               k)]
      (when-not (nil? k')
        (aset jsprops "key" k')))
