Fixed computation error with base values

This commit is contained in:
Stefan Zermatten
2021-07-12 14:56:12 +02:00
parent 5cf78932e6
commit 8eaad3600f

View File

@@ -20,10 +20,12 @@ export default class EffectAggregator{
switch(effect.operation){
case 'base':
// Take the largest base value
if(Number.isFinite(this.base)){
this.base = Math.max(this.base, result);
} else {
this.base = result;
if (Number.isFinite(result)){
if(Number.isFinite(this.base)){
this.base = Math.max(this.base, result);
} else {
this.base = result;
}
}
break;
case 'add':