Skip to content

Commit

Permalink
opts needs to be defined before be-add
Browse files Browse the repository at this point in the history
  • Loading branch information
arthuredelstein committed Jun 27, 2012
1 parent a08ef99 commit f770812
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/crate/binding.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
(fn [_ _ _ [event el v]]
(func event el v)))))

(defn opt [bc k]
((.-opts bc) k))

(defn- bc-add [bc path key]
(let [sa (subatom (.-atm bc) path)
elem ((opt bc :as) sa)]
Expand All @@ -123,9 +126,6 @@
(set! (.-stuff bc) (dissoc (.-stuff bc) key))
(notify (.-notif bc) nil [:remove (:elem prev) nil])) )

(defn opt [bc k]
((.-opts bc) k))

(defn ->indexed [coll]
(cond
(map? coll) (seq coll)
Expand Down

0 comments on commit f770812

Please sign in to comment.