From cc838600fbedd1bf71e172d76e5842ea3adff75c Mon Sep 17 00:00:00 2001 From: Tony Kay Date: Fri, 17 Nov 2017 12:04:19 -0800 Subject: [PATCH] fixed bad assert causing async bug Took 9 minutes --- CHANGELOG.md | 4 ++++ project.clj | 1 - src/main/fulcro/client/impl/om_plumbing.cljc | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872e28064..c04552d20 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +1.1.1 +----- +- Fixed assert/async bug + 1.1.0 ----- - Added support for shadow DOM (for browsers that support it) diff --git a/project.clj b/project.clj index 918d721aa..936be1506 100644 --- a/project.clj +++ b/project.clj @@ -98,7 +98,6 @@ :compiler {:main fulcro-devguide.guide :asset-path "js" :optimizations :advanced - :elide-asserts false ; IMPORTANT: core.async 0.3.443 seems to have a bug when you elide asserts :devcards true :output-to "docs/js/guide.js" :output-dir "docs/js" diff --git a/src/main/fulcro/client/impl/om_plumbing.cljc b/src/main/fulcro/client/impl/om_plumbing.cljc index 16f169611..1981cecca 100644 --- a/src/main/fulcro/client/impl/om_plumbing.cljc +++ b/src/main/fulcro/client/impl/om_plumbing.cljc @@ -78,7 +78,7 @@ (loop [entry (async/poll! queue) entries []] (cond entry (recur (async/poll! queue) (conj entries (resolve-tempids entry tempid-map))) - (seq entries) (doseq [e entries] (assert (async/offer! queue e) "Queue should not block."))))) + (seq entries) (doseq [e entries] (when-not (async/offer! queue e) (log/error "Offer failed to enqueue a value.")))))) (defn remove-loads-and-fallbacks "Removes all fulcro/load and tx/fallback mutations from the query"