Fixed dependency loops causing a stack overflow. Added level variable

This commit is contained in:
Thaum Rystra
2020-05-14 13:32:46 +02:00
parent 97fcb76454
commit 29588a87d0
4 changed files with 39 additions and 6 deletions

View File

@@ -16,6 +16,8 @@ export default function computeStat(stat, memo){
console.warn('dependencyLoop', stat);
return;
}
// Before doing any work, mark this stat as busy
stat.computationDetails.busyComputing = true;
// Compute and aggregate all the effects
let aggregator = new EffectAggregator(stat, memo)
each(stat.computationDetails.effects, (effect) => {