mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
fix: tier weights now ignores tanks without entries
This commit is contained in:
1 parent
fb66027de0
commit
ae3d0a08cd
1 file changed
+4
@@ -107,6 +107,10 @@ export default async function statsfull<Type extends StatType>(
|
|||||||
tierWeights = await entries.reduce<PossiblyPromise<TierWeightsRecord>>(
|
tierWeights = await entries.reduce<PossiblyPromise<TierWeightsRecord>>(
|
||||||
async (accumulator, [tankIdString, stats]) => {
|
async (accumulator, [tankIdString, stats]) => {
|
||||||
const tankId = parseInt(tankIdString);
|
const tankId = parseInt(tankIdString);
|
||||||
|
const tankopediaEntry = (await tankopedia)[tankId];
|
||||||
|
|
||||||
|
if (!tankopediaEntry) return accumulator;
|
||||||
|
|
||||||
const tier = (await tankopedia)[tankId].tier as Tier;
|
const tier = (await tankopedia)[tankId].tier as Tier;
|
||||||
|
|
||||||
if ((await accumulator)[tier]) {
|
if ((await accumulator)[tier]) {
|
||||||
|
|||||||
Reference in new issue
Block a user