refactor: remove unneeded intermediate variable in id tags cache code
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 27 Mar 2023 12:57:28 +0000 (14:57 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 27 Mar 2023 12:57:28 +0000 (14:57 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/IdTagsCache.ts

index 8d4027839851151374d23c795d04520d5fa9ee0f..e5d28181b043de2f7faf1f0f9a71d6dbf6ef44df 100644 (file)
@@ -81,8 +81,10 @@ export class IdTagsCache {
   private getConnectorAffinityIdTag(chargingStation: ChargingStation, connectorId: number): string {
     const file = ChargingStationUtils.getIdTagsFile(chargingStation.stationInfo);
     const idTags = this.getIdTags(file);
-    const hashId = chargingStation.stationInfo.hashId;
-    const addressableKey = this.getIdTagsCacheIndexesAddressableKey(file, hashId);
+    const addressableKey = this.getIdTagsCacheIndexesAddressableKey(
+      file,
+      chargingStation.stationInfo.hashId
+    );
     this.idTagsCachesAddressableIndexes.set(
       addressableKey,
       (chargingStation.index - 1 + (connectorId - 1)) % idTags.length