Merge pull request 'CT-30 BUG: Forcetracker clear button removes login token' (#14) from bugfix/CT-36/btn-continues-removing-on-mobile into master
Reviewed-on: mitch/crusade-tracker#14
This commit is contained in:
commit
d89469dac2
@ -100,10 +100,11 @@ export class ArmyDetailComponent implements OnInit {
|
|||||||
if (unit && unit.id && unit.unitPowerLevel && this.forceAddedOrNot(unit.id)) {
|
if (unit && unit.id && unit.unitPowerLevel && this.forceAddedOrNot(unit.id)) {
|
||||||
this.forcePoints = this.forcePoints - unit.unitPowerLevel;
|
this.forcePoints = this.forcePoints - unit.unitPowerLevel;
|
||||||
const index = this.getForceUnitIndex(unit);
|
const index = this.getForceUnitIndex(unit);
|
||||||
if (index) {
|
if (index !== null) {
|
||||||
this.forceUnitList.splice(index, 1);
|
this.forceUnitList.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(this.forceUnitList);
|
||||||
localStorage.setItem('forceAddedListStored', JSON.stringify(this.forceUnitList));
|
localStorage.setItem('forceAddedListStored', JSON.stringify(this.forceUnitList));
|
||||||
return this.forcePoints;
|
return this.forcePoints;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user