Skip to content

Commit a6cc845

Browse files
Teambuilder: Fix bug with duplicated item entries (#2329)
* Ok i am bad so here is me doing it properly this time * rename variable * Update battle-dex-search.ts * help * Apply suggestions from code review --------- Co-authored-by: Kris Johnson <[email protected]>
1 parent 6657e68 commit a6cc845

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

+8-6
Original file line numberDiff line numberDiff line change
@@ -1321,16 +1321,18 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
13211321
if (abilityItem === item.id) abilitySpecific.push(row);
13221322
}
13231323
if (speciesSpecific.length) {
1324-
results.unshift(
1324+
return [
13251325
['header', "Specific to " + speciesName],
1326-
...speciesSpecific
1327-
);
1326+
...speciesSpecific,
1327+
...results,
1328+
];
13281329
}
13291330
if (abilitySpecific.length) {
1330-
results.unshift(
1331+
return [
13311332
['header', `Specific to ${this.set!.ability!}`],
1332-
...abilitySpecific
1333-
);
1333+
...abilitySpecific,
1334+
...results,
1335+
];
13341336
}
13351337
return results;
13361338
}

0 commit comments

Comments
 (0)