Files
DiceCloud/app/imports/api/engine/action/applyProperties/applyToggleProperty.ts
2024-02-16 10:30:50 +02:00

11 lines
285 B
TypeScript

// TODO
export default function applyToggle(node, actionContext) {
applyNodeTriggers(node, 'before', actionContext);
const prop = node.doc
recalculateCalculation(prop.condition, actionContext);
if (prop.condition?.value) {
return applyChildren(node, actionContext);
}
}