From: Jérôme Benoit Date: Mon, 31 Jul 2023 14:52:24 +0000 (+0200) Subject: perf: only clone the targeted connector status in ATG X-Git-Tag: v1.2.20~57 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a82d03296ad3232474c9f769e02c840bb87d0178;p=e-mobility-charging-stations-simulator.git perf: only clone the targeted connector status in ATG Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/AutomaticTransactionGenerator.ts b/src/charging-station/AutomaticTransactionGenerator.ts index dfab482a..1cf949d7 100644 --- a/src/charging-station/AutomaticTransactionGenerator.ts +++ b/src/charging-station/AutomaticTransactionGenerator.ts @@ -356,9 +356,9 @@ export class AutomaticTransactionGenerator extends AsyncResource { const connectorStatus = this.chargingStation.getAutomaticTransactionGeneratorStatuses()?.[ connectorId ] - ? cloneObject(this.chargingStation.getAutomaticTransactionGeneratorStatuses()!)[ - connectorId - ] + ? cloneObject( + this.chargingStation.getAutomaticTransactionGeneratorStatuses()![connectorId], + ) : undefined; delete connectorStatus?.startDate; delete connectorStatus?.lastRunDate;