leonoel / missionary

A functional effect and streaming system for Clojure/Script
Eclipse Public License 2.0
630 stars 26 forks source link

Cannot read property 'call' of null #19

Closed lgrapenthin closed 3 years ago

lgrapenthin commented 3 years ago
(let [run-task (fn [t]
                   (t #(.log js/console "success" %)
                      #(.log js/console "err" %)))
        in (atom nil)
        in-flow (m/watch in)]
    (run-task
     (->> (m/ap (let [x (m/?! in-flow)
                      y (m/?! in-flow)]
                  (println [x y])))
          (m/aggregate conj)))
    (reset! in 42))

object[TypeError TypeError: Cannot read property 'call' of null]

() missionary$impl$watch_cb (target/node/build/missionary/impl.cljs:738:18) cljs$core$IWatchable$_notify_watches$arity$3 (target/node/build/cljs/core.cljs:4450:8) cljs$core$resetBANG (target/node/build/cljs/core.cljs:4491:28)