Don't rerun dataflow blocks when the facet they belong to is terminated

This commit is contained in:
Tony Garnock-Jones 2018-12-13 20:16:47 +00:00
parent f0e679585f
commit ed20317225
1 changed files with 3 additions and 1 deletions

View File

@ -730,7 +730,9 @@ Facet.prototype.addDataflow = function (subjectFun, priority) {
return this.addEndpoint(() => {
let subjectId = this.actor.dataspace.dataflow.currentSubjectId;
this.actor.scheduleScript(() => {
this.actor.dataspace.dataflow.withSubject(subjectId, () => subjectFun.call(this.fields));
if (this.isLive) {
this.actor.dataspace.dataflow.withSubject(subjectId, () => subjectFun.call(this.fields));
}
}, priority);
return [void 0, null];
});