From ed20317225b30bc5893eb7636c854ddb57111d3c Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 13 Dec 2018 20:16:47 +0000 Subject: [PATCH] Don't rerun dataflow blocks when the facet they belong to is terminated --- packages/core/src/dataspace.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/core/src/dataspace.js b/packages/core/src/dataspace.js index 5098bb5..e842d2e 100644 --- a/packages/core/src/dataspace.js +++ b/packages/core/src/dataspace.js @@ -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]; });