Only trigger onStateChange with non-empty patch (?)

This commit is contained in:
Tony Garnock-Jones 2016-05-11 10:59:44 -04:00
parent 0693e88031
commit 6ba9b402ec
1 changed files with 3 additions and 1 deletions

View File

@ -280,7 +280,9 @@ Dataspace.prototype.deliverPatches = function (oldMux, updateStreamResult) {
self.deliverEvent(pid, stateChange(patch));
});
events.metaEvents.forEach(Dataspace.stateChange);
this.onStateChange(this.mux, updateStreamResult.deltaAggregate);
if (!updateStreamResult.deltaAggregate.isEmpty()) {
this.onStateChange(this.mux, updateStreamResult.deltaAggregate);
}
};
Dataspace.prototype.deliverEvent = function (pid, event) {