diff --git a/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js b/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js index ae609923..4bbf2e3e 100644 --- a/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js +++ b/app/imports/api/engine/computation/computeComputation/computeByType/computeVariable/aggregate/aggregateEffect.js @@ -45,7 +45,8 @@ export default function aggregateEffect({ node, linkedNode, link }) { // get a shorter reference to the aggregator document const aggregator = node.data.effectAggregator; // Get the result of the effect - const result = linkedNode.data.amount?.value; + let result = linkedNode.data.amount?.value; + if (typeof result !== 'number') result = undefined; // Aggregate the effect based on its operation switch (linkedNode.data.operation) {