fix: fix get composite schedule rejection condition
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPRequestService.ts
index e98ebdfa6ab4384eb0b7ee2683cf7cdf3302919b..e78f71c56d1300137c12800c8f343e2a1ae9791c 100644 (file)
@@ -27,7 +27,6 @@ import {
   cloneObject,
   formatDurationMilliSeconds,
   handleSendMessageError,
-  isNullOrUndefined,
   logger
 } from '../../utils/index.js'
 type Ajv = _Ajv.default
@@ -436,7 +435,7 @@ export abstract class OCPPRequestService {
           chargingStation.wsConnection?.send(messageToSend, (error?: Error) => {
             PerformanceStatistics.endMeasure(commandName, beginId)
             clearTimeout(sendTimeout)
-            if (isNullOrUndefined(error)) {
+            if (error == null) {
               logger.debug(
                 `${chargingStation.logPrefix()} >> Command '${commandName}' sent ${OCPPServiceUtils.getMessageTypeString(
                   messageType