Remove obsolete code path

This commit is contained in:
Dan Holmsand 2014-11-30 14:25:26 +01:00
parent cd44e87519
commit c5497ea02e
1 changed files with 2 additions and 3 deletions

View File

@ -187,6 +187,7 @@
(def cached-wrapper (util/memoize-1 get-wrapper)) (def cached-wrapper (util/memoize-1 get-wrapper))
(defn fn-to-class [f] (defn fn-to-class [f]
(assert (ifn? f) (str "Expected a function, not " (pr-str f)))
(let [spec (meta f) (let [spec (meta f)
withrender (assoc spec :component-function f) withrender (assoc spec :component-function f)
res (comp/create-class withrender) res (comp/create-class withrender)
@ -200,9 +201,7 @@
(let [cached-class (util/cached-react-class tag)] (let [cached-class (util/cached-react-class tag)]
(if-not (nil? cached-class) (if-not (nil? cached-class)
cached-class cached-class
(if (.' js/React isValidElement tag) (fn-to-class tag)))))
(util/cache-react-class tag (wrap-component tag nil nil))
(fn-to-class tag))))))
(def cached-parse (util/memoize-1 parse-tag)) (def cached-parse (util/memoize-1 parse-tag))