Allowed effects and calculations to target nearest ancestors of #type

This commit is contained in:
Stefan Zermatten
2021-02-02 16:11:59 +02:00
parent 69c72e0987
commit aaa5d0b63b
13 changed files with 69 additions and 17 deletions

View File

@@ -30,7 +30,7 @@ export default function computeToggle(toggle, memo){
result,
context,
dependencies,
} = evaluateCalculation(toggle.condition, memo);
} = evaluateCalculation({string: toggle.condition, prop: toggle, memo});
toggle.toggleResult = !!result.value;
toggle.dependencies.push(...dependencies);
if (context.errors.length){