From: Jérôme Benoit Date: Sun, 13 Mar 2022 11:07:25 +0000 (+0100) Subject: Fix code logic at building boot notification request X-Git-Tag: v1.1.55~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=d312064afb8df22dbe11a626d9b64c9ae12d4770;p=e-mobility-charging-stations-simulator.git Fix code logic at building boot notification request Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 5b8247ea..f9175803 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -823,12 +823,12 @@ export default class ChargingStation { ...(!Utils.isUndefined(this.stationInfo.firmwareVersion) && { firmwareVersion: this.stationInfo.firmwareVersion, }), - ...(Utils.isUndefined(this.stationInfo.iccid) && { iccid: this.stationInfo.iccid }), - ...(Utils.isUndefined(this.stationInfo.imsi) && { imsi: this.stationInfo.imsi }), - ...(Utils.isUndefined(this.stationInfo.meterSerialNumber) && { + ...(!Utils.isUndefined(this.stationInfo.iccid) && { iccid: this.stationInfo.iccid }), + ...(!Utils.isUndefined(this.stationInfo.imsi) && { imsi: this.stationInfo.imsi }), + ...(!Utils.isUndefined(this.stationInfo.meterSerialNumber) && { meterSerialNumber: this.stationInfo.meterSerialNumber, }), - ...(Utils.isUndefined(this.stationInfo.meterType) && { + ...(!Utils.isUndefined(this.stationInfo.meterType) && { meterType: this.stationInfo.meterType, }), };