File tree 1 file changed +11
-2
lines changed
play.pokemonshowdown.com/src
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1320,18 +1320,27 @@ class BattleItemSearch extends BattleTypedSearch<'item'> {
1320
1320
if ( item . itemUser ?. includes ( speciesName ) ) speciesSpecific . push ( row ) ;
1321
1321
if ( abilityItem === item . id ) abilitySpecific . push ( row ) ;
1322
1322
}
1323
+
1324
+ const specific : SearchRow [ ] = [ ] ;
1325
+
1323
1326
if ( speciesSpecific . length ) {
1324
- results . unshift (
1327
+ specific . unshift (
1325
1328
[ 'header' , "Specific to " + speciesName ] ,
1326
1329
...speciesSpecific
1327
1330
) ;
1328
1331
}
1329
1332
if ( abilitySpecific . length ) {
1330
- results . unshift (
1333
+ specific . unshift (
1331
1334
[ 'header' , `Specific to ${ this . set ! . ability ! } ` ] ,
1332
1335
...abilitySpecific
1333
1336
) ;
1334
1337
}
1338
+ if ( specific . length ) {
1339
+ return [
1340
+ ...specific ,
1341
+ ...results ,
1342
+ ] ;
1343
+ }
1335
1344
return results ;
1336
1345
}
1337
1346
override defaultFilter ( results : SearchRow [ ] ) {
You can’t perform that action at this time.
0 commit comments