fix double adding stats bug

This commit is contained in:
Jeff Colombo 2019-01-20 20:22:09 -05:00
parent e2b750048d
commit e4c9aff117

View File

@ -170,11 +170,10 @@ Pokemon.forEach((mon) => {
} }
return 0; return 0;
}); });
pokemon.pvp[league].push(...combinedStatsDistribution[league][combinedStats]);
} }
}); });
fs.mkdir(outPath, {recursive: true}, () => { fs.mkdir(outPath, { recursive: true }, () => {
fs.writeFile(outPath + mon.id + '.json', JSON.stringify(pokemon), (err) => { fs.writeFile(outPath + mon.id + '.json', JSON.stringify(pokemon), (err) => {
if (err) { if (err) {
/* tslint:disable-next-line:no-console */ /* tslint:disable-next-line:no-console */
@ -202,7 +201,7 @@ familyOrder.forEach((familyId) => {
}); });
}); });
fs.mkdir(outPath, {recursive: true}, () => { fs.mkdir(outPath, { recursive: true }, () => {
fs.writeFile(outPath + 'order.json', JSON.stringify(pokemonOrder), (err) => { fs.writeFile(outPath + 'order.json', JSON.stringify(pokemonOrder), (err) => {
if (err) { if (err) {
/* tslint:disable-next-line:no-console */ /* tslint:disable-next-line:no-console */