From d1c79973c54fafaa68d572eb62f77a0282dc822b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 9 Dec 2021 18:54:43 +0100 Subject: [PATCH] Repair code generation error for "stop on (...)" handlers --- packages/compiler/src/compiler/codegen.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler/src/compiler/codegen.ts b/packages/compiler/src/compiler/codegen.ts index fc7f9d1..6545ea9 100644 --- a/packages/compiler/src/compiler/codegen.ts +++ b/packages/compiler/src/compiler/codegen.ts @@ -199,7 +199,7 @@ ${joinItems(sa.captureBinders.map(binderTypeGuard(ctx, t)), '\n')} x(ctx.parser.eventHandlerEndpointStatement, (s, t) => { if (s.triggerType === 'dataflow') { - return t`dataflow { if (${walk(s.predicate)}) { ${terminalWrap(t, s.terminal, walk(s.body))} } }`; + return t`__SYNDICATE__.Turn.active._dataflow(() => { if (${walk(s.predicate)}) { ${terminalWrap(t, s.terminal, walk(s.body))} } });`; } if (s.triggerType === 'stop') {