From a568cdfb1e34e4855f77e353867373321a10dd68 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Sat, 19 Nov 2022 18:57:26 +0200 Subject: [PATCH] Fixed NaNing of skills that have rolled effects --- .../computeByType/computeVariable/aggregate/aggregateEffect.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {