From 7df50fbac9eb1df9a25f9a5c72455b86ccb308f8 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sun, 7 Aug 2016 22:50:04 -0400 Subject: [PATCH] We must flushPendingPatch after enqueueing some "meta" event as an action --- js/src/dataspace.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/src/dataspace.js b/js/src/dataspace.js index a3ad803..dc3cc83 100644 --- a/js/src/dataspace.js +++ b/js/src/dataspace.js @@ -196,6 +196,11 @@ Dataspace.prototype.handleEvent = function (e) { exn.event = e; throw exn; } + this.flushPendingPatch(); + // ^ Flush in case we put something in pendingPatch in the + // stateChange clause above. In way, this point is the end of + // `meta`'s "turn", and we flushPendingPatch at the end of other + // turns, so we should here too. return true; };