Fixed error in stat computation
This commit is contained in:
@@ -25,9 +25,15 @@ export default function computeStat(stat, memo){
|
|||||||
let proficiencies = stat.computationDetails.proficiencies;
|
let proficiencies = stat.computationDetails.proficiencies;
|
||||||
|
|
||||||
// Get references to all the stats that share the variable name
|
// Get references to all the stats that share the variable name
|
||||||
let sameNameStats = stat.computationDetails.idsOfSameName.map(
|
let sameNameStats
|
||||||
id => memo.propsById[id]
|
|
||||||
);
|
if (stat.computationDetails.idsOfSameName){
|
||||||
|
sameNameStats = stat.computationDetails.idsOfSameName.map(
|
||||||
|
id => memo.propsById[id]
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
sameNameStats = [];
|
||||||
|
}
|
||||||
|
|
||||||
let allStats = [stat, ...sameNameStats];
|
let allStats = [stat, ...sameNameStats];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user