Skip to content

Commit

Permalink
Make sure to schedule-render! after queueing components or reads.
Browse files Browse the repository at this point in the history
Otherwise, this doesn't work when merged with om-860 because the devcards for
om-860 also exposes a race condition with the overriding om/*raf* we define in
this branch.
  • Loading branch information
bnoguchi committed Apr 5, 2017
1 parent d67c776 commit aeea461
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/om/next.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1296,9 +1296,11 @@
(swap! st update-in [:om.next/queries (or c root)] merge
(merge (when query {:query query}) (when params {:params params})))
(when (and (not (nil? c)) (nil? reads))
(p/queue! r [c]))
(p/queue! r [c])
(schedule-render! r))
(when-not (nil? reads)
(p/queue! r reads))
(p/queue! r reads)
(schedule-render! r))
(p/reindex! r)
(let [rootq (if (not (nil? c))
(full-query c)
Expand Down

0 comments on commit aeea461

Please sign in to comment.