VitalLabs / nativestore

Low-level, client-side database for Clojurescript applications integrated with the Derive library.
21 stars 1 forks source link

IWatchable can't find the watcher because is using get instead of aget #6

Open roberto-robles opened 8 years ago

roberto-robles commented 8 years ago
(add-watch db "iscroll"
                 (fn [& args]
                   (l/log "refreshing iscroll" args owner refresh)
                   (js/setTimeout (partial refresh owner) 0)))

in the repl:

cljs.user> (get (.-tx_listeners db) "iscroll")
nil

cljs.user> (aget (.-tx_listeners db) "iscroll")
#object[Function "function (var_args){
var args = null;
if (arguments.length > 0) {
var G__71223__i = 0, G__71223__a = new Array(arguments.length -  0);
while (G__71223__i < G__71223__a.length) {G__71223__a[G__71223__i] = arguments[G__71223__i + 0]; ++G__71223__i;}
  args = new cljs.core.IndexedSeq(G__71223__a,0);
}
roberto-robles commented 8 years ago

Addressed on #7