This commit is contained in:
Dan Holmsand 2015-09-10 15:14:20 +02:00
parent 02be9425e5
commit 0634806104
2 changed files with 8 additions and 3 deletions

View File

@ -47,6 +47,7 @@
{:compiler {:optimizations :advanced
:elide-asserts true
:pretty-print false
;; :pseudo-names true
:output-dir "target/client"}}}}}]
:prod-test [:test :prod]

View File

@ -211,12 +211,17 @@
(when (== ra.dirty? maybe-dirty)
(set! ra.norun? true)
(doseq [w ra.watching]
(when (reaction? w)
(when (and (reaction? w)
(not (identical? (.-dirty? w) clean)))
(-deref w)))
(set! ra.norun? false)
(when (== ra.dirty? maybe-dirty)
(set! ra.dirty? clean))))
(defn- ra-run-check [ra]
(binding [*ratom-context* (js-obj)]
(ra-check-clean ra)))
(defn- ra-handle-change [ra sender oldval newval]
(when ra.active?
(let [old-dirty ra.dirty?]
@ -229,8 +234,7 @@
(do
;; FIXME: is this correct?
(when (== ra.dirty? maybe-dirty)
(binding [*ratom-context* (js-obj)]
(ra-check-clean ra)))
(ra-run-check ra))
(when-not (== ra.dirty? clean)
((or ra.auto-run run) ra)))
(when (== old-dirty clean)