X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2FIdTagsCache.ts;h=f00a558971dad96a44b682150735f823d96fa63f;hb=0a1dd746244cebb3633d88c6650839d9f32227fe;hp=b50c062008b9b1388d9ea21cfeb21ac3ba0018ce;hpb=66a7748ddeda8c94d7562a1ce58d440319654a4c;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/IdTagsCache.ts b/src/charging-station/IdTagsCache.ts index b50c0620..f00a5589 100644 --- a/src/charging-station/IdTagsCache.ts +++ b/src/charging-station/IdTagsCache.ts @@ -48,9 +48,10 @@ export class IdTagsCache { chargingStation: ChargingStation, connectorId: number ): string { - const hashId = chargingStation.stationInfo.hashId // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const idTagsFile = getIdTagsFile(chargingStation.stationInfo)! + const hashId = chargingStation.stationInfo!.hashId + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + const idTagsFile = getIdTagsFile(chargingStation.stationInfo!)! switch (distribution) { case IdTagDistribution.RANDOM: return this.getRandomIdTag(hashId, idTagsFile) @@ -108,12 +109,13 @@ export class IdTagsCache { private getConnectorAffinityIdTag (chargingStation: ChargingStation, connectorId: number): string { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - const file = getIdTagsFile(chargingStation.stationInfo)! + const file = getIdTagsFile(chargingStation.stationInfo!)! // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const idTags = this.getIdTags(file)! const addressableKey = this.getIdTagsCacheIndexesAddressableKey( file, - chargingStation.stationInfo.hashId + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + chargingStation.stationInfo!.hashId ) this.idTagsCachesAddressableIndexes.set( addressableKey,