Apply suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
Wlowscha 2025-02-23 14:36:41 +01:00 committed by GitHub
parent df4af6c173
commit 80a9d31ddb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1246,7 +1246,6 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.filterBar.updateFilterLabels();
this.filterText.updateFilterLabels();
// filter
this.filteredPokemonData = [];
this.allSpecies.forEach(species => {
@ -1348,10 +1347,10 @@ export default class PokedexUiHandler extends MessageUiHandler {
}
// Gen filter
const fitsGen = this.filterBar.getVals(DropDownColumn.GEN).includes(species.generation);
const fitsGen = this.filterBar.getVals(DropDownColumn.GEN).includes(species.generation);
// Type filter
const fitsType = this.filterBar.getVals(DropDownColumn.TYPES).some(type => species.isOfType((type as number) - 1));
const fitsType = this.filterBar.getVals(DropDownColumn.TYPES).some(type => species.isOfType((type as number) - 1));
// Biome filter
const indexToBiome = new Map(