CT-30 BUG: Forcetracker clear button removes login token

This commit is contained in:
mitch 2022-03-23 09:04:16 -04:00
parent a522f61243
commit 0aa3dd51fd

View File

@ -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;
} }