Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pyuk-bot committed Feb 2, 2025
1 parent 6fdb02f commit b1d9bff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions play.pokemonshowdown.com/src/battle-dex-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,6 @@ abstract class BattleTypedSearch<T extends SearchType> {
let results: SearchRow[];
let illegalResults: SearchRow[] | null;

if (this.defaultFilter) {
results = this.defaultFilter(this.baseResults);
}
if (filters) {
results = [];
illegalResults = [];
Expand All @@ -730,6 +727,9 @@ abstract class BattleTypedSearch<T extends SearchType> {
results = [...this.baseResults];
illegalResults = null;
}
if (this.defaultFilter) {
results = this.defaultFilter(results);
}

if (sortCol) {
results = results.filter(([rowType]) => rowType === this.searchType);
Expand Down Expand Up @@ -1309,7 +1309,7 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
// poisonheal: 'toxicorb',
// toxicboost: 'toxicorb',
// flareboost: 'flameorb',
}[toID(this.set?.ability) as string]
}[toID(this.set?.ability) as string];
for (const row of results) {
if (row[0] !== 'item') continue;
const item = this.dex.items.get(row[1]);
Expand All @@ -1319,13 +1319,13 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
if (speciesSpecific.length) {
results.unshift(
['header', "Specific to " + speciesName],
...speciesSpecific,
...speciesSpecific
);
}
if (abilitySpecific.length) {
results.unshift(
['header', "Specific to " + this.set!.ability],
...abilitySpecific,
...abilitySpecific
);
}
return results;
Expand Down

0 comments on commit b1d9bff

Please sign in to comment.