Skip to content

Commit b1d9bff

Browse files
committed
Fixes
1 parent 6fdb02f commit b1d9bff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

play.pokemonshowdown.com/src/battle-dex-search.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -703,9 +703,6 @@ abstract class BattleTypedSearch<T extends SearchType> {
703703
let results: SearchRow[];
704704
let illegalResults: SearchRow[] | null;
705705

706-
if (this.defaultFilter) {
707-
results = this.defaultFilter(this.baseResults);
708-
}
709706
if (filters) {
710707
results = [];
711708
illegalResults = [];
@@ -730,6 +727,9 @@ abstract class BattleTypedSearch<T extends SearchType> {
730727
results = [...this.baseResults];
731728
illegalResults = null;
732729
}
730+
if (this.defaultFilter) {
731+
results = this.defaultFilter(results);
732+
}
733733

734734
if (sortCol) {
735735
results = results.filter(([rowType]) => rowType === this.searchType);
@@ -1309,7 +1309,7 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
13091309
// poisonheal: 'toxicorb',
13101310
// toxicboost: 'toxicorb',
13111311
// flareboost: 'flameorb',
1312-
}[toID(this.set?.ability) as string]
1312+
}[toID(this.set?.ability) as string];
13131313
for (const row of results) {
13141314
if (row[0] !== 'item') continue;
13151315
const item = this.dex.items.get(row[1]);
@@ -1319,13 +1319,13 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
13191319
if (speciesSpecific.length) {
13201320
results.unshift(
13211321
['header', "Specific to " + speciesName],
1322-
...speciesSpecific,
1322+
...speciesSpecific
13231323
);
13241324
}
13251325
if (abilitySpecific.length) {
13261326
results.unshift(
13271327
['header', "Specific to " + this.set!.ability],
1328-
...abilitySpecific,
1328+
...abilitySpecific
13291329
);
13301330
}
13311331
return results;

0 commit comments

Comments
 (0)