Fix train troopers action

This commit is contained in:
Anton Vakhrushev 2020-04-22 09:24:36 +03:00
parent 5c39aefed0
commit ea4d6f6681

View File

@ -10,7 +10,7 @@ export class TrainTrooperAction extends ActionController {
const troopId = this.getTroopId(args);
const trainCount = this.getTrainCount(args);
const block = jQuery(`#nonFavouriteTroops .innerTroopWrapper.troop${troopId}`);
const block = jQuery(`.innerTroopWrapper[data-troopid="${troopId}"]`);
if (block.length !== 1) {
throw new ActionError(`Troop block not found`);
}