Fix code logic at building boot notification request
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 11:07:25 +0000 (12:07 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 13 Mar 2022 11:07:25 +0000 (12:07 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index 5b8247ea94329b6a81aca488ff8d04e985f75917..f917580339feae3e6a6dd3222698d8eaad65f77c 100644 (file)
@@ -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,
       }),
     };