We must flushPendingPatch after enqueueing some "meta" event as an action

This commit is contained in:
Tony Garnock-Jones 2016-08-07 22:50:04 -04:00
parent a55dc6ec58
commit 7df50fbac9
1 changed files with 5 additions and 0 deletions

View File

@ -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;
};