Require explicit facet in Turn.stop

This commit is contained in:
Tony Garnock-Jones 2024-03-09 23:05:40 +01:00
parent b4d728ca7a
commit 2bcffd3bab
2 changed files with 4 additions and 4 deletions

View File

@ -279,7 +279,7 @@ export const STOP_ON_RETRACT = Symbol('stop-on-retract'); // NB. NOT A GLOBAL SY
export class StopOnRetract implements Partial<Entity> { export class StopOnRetract implements Partial<Entity> {
retract(_handle: Handle): void { retract(_handle: Handle): void {
Turn.active.stop(); Turn.active.stop(Turn.activeFacet);
} }
data = STOP_ON_RETRACT; data = STOP_ON_RETRACT;
} }
@ -361,11 +361,11 @@ export class Turn {
} }
// Alias for syndicatec code generator to use // Alias for syndicatec code generator to use
_stop(facet: Facet = this.activeFacet, continuation?: LocalAction) { _stop(facet: Facet, continuation?: LocalAction) {
this.stop(facet, continuation); this.stop(facet, continuation);
} }
stop(facet: Facet = this.activeFacet, continuation?: LocalAction) { stop(facet: Facet, continuation?: LocalAction) {
if (continuation) facet.onStop(continuation); if (continuation) facet.onStop(continuation);
facet._terminate(true); facet._terminate(true);
} }

View File

@ -127,7 +127,7 @@ export class Membrane {
} }
export const INERT_REF: Ref = { export const INERT_REF: Ref = {
relay: Actor.boot(() => Turn.active.stop()).root, relay: Actor.boot(() => Turn.active.stop(Turn.activeFacet)).root,
target: {}, target: {},
}; };