Repair error caused by collecting fields too early in during
This commit is contained in:
parent
7423479de3
commit
a64a8177eb
|
@ -198,13 +198,12 @@ export function expand(tree: Items, ctx: ExpansionContext): Items {
|
|||
} else {
|
||||
// TODO: untyped template
|
||||
const sa = compilePattern(s.pattern);
|
||||
const body = ctx.withCollectedFields(s.facetFields, () => walk(s.body));
|
||||
return t`withSelfDo(function (thisFacet) {
|
||||
const _Facets = new __SYNDICATE__.Dictionary<__SYNDICATE__.Facet<any>>();
|
||||
on asserted ${patternText(s.pattern)} => react {
|
||||
_Facets.set([${commaJoin(sa.captureBinders.map(t=>[t.id]))}], thisFacet);
|
||||
dataflow { } // TODO: horrible hack to keep the facet alive if no other endpoints
|
||||
${body}
|
||||
${s.body}
|
||||
}
|
||||
on retracted ${patternText(s.pattern)} => {
|
||||
const _Key = [${commaJoin(sa.captureBinders.map(t=>[t.id]))}];
|
||||
|
|
Loading…
Reference in New Issue