Make `continuation` argument to `Facet.stop` optional

This commit is contained in:
Tony Garnock-Jones 2018-11-04 19:40:39 +00:00
parent 8a0dfb12c6
commit 2cbbfd3394
1 changed files with 3 additions and 1 deletions

View File

@ -519,7 +519,9 @@ Facet.prototype.stop = function (continuation) {
this.actor.scheduleScript(() => {
this._terminate();
this.actor.scheduleScript(() => {
continuation.call(this.fields); // TODO: is this the correct scope to use??
if (continuation) {
continuation.call(this.fields); // TODO: is this the correct scope to use??
}
});
});
});