From 0aa3dd51fd4ed874f139d44caf6325f15934b36d Mon Sep 17 00:00:00 2001 From: mitch Date: Wed, 23 Mar 2022 09:04:16 -0400 Subject: [PATCH] CT-30 BUG: Forcetracker clear button removes login token --- src/main/webapp/app/entities/army/army-detail.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/webapp/app/entities/army/army-detail.component.ts b/src/main/webapp/app/entities/army/army-detail.component.ts index e6405016..a272be0f 100644 --- a/src/main/webapp/app/entities/army/army-detail.component.ts +++ b/src/main/webapp/app/entities/army/army-detail.component.ts @@ -100,10 +100,11 @@ export class ArmyDetailComponent implements OnInit { if (unit && unit.id && unit.unitPowerLevel && this.forceAddedOrNot(unit.id)) { this.forcePoints = this.forcePoints - unit.unitPowerLevel; const index = this.getForceUnitIndex(unit); - if (index) { + if (index !== null) { this.forceUnitList.splice(index, 1); } } + console.log(this.forceUnitList); localStorage.setItem('forceAddedListStored', JSON.stringify(this.forceUnitList)); return this.forcePoints; }