Remove unneeded type check in isEmptyObject().
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPRequestService.ts
index 9fa50b4f2f53a7dc7f2b6f982208f4441451d87f..29c740a187310d11fe5a0dedf4ea3e05de8d016c 100644 (file)
@@ -159,11 +159,13 @@ export default abstract class OCPPRequestService {
     }
   ): Promise<ResponseType> {
     if (
-      (chargingStation.isInUnknownState() && commandName === RequestCommand.BOOT_NOTIFICATION) ||
-      (!chargingStation.getOcppStrictCompliance() && chargingStation.isInUnknownState()) ||
-      chargingStation.isInAcceptedState() ||
-      (chargingStation.isInPendingState() &&
-        (params.triggerMessage || messageType === MessageType.CALL_RESULT_MESSAGE))
+      (chargingStation.isInUnknownState() === true &&
+        commandName === RequestCommand.BOOT_NOTIFICATION) ||
+      (chargingStation.getOcppStrictCompliance() === false &&
+        chargingStation.isInUnknownState() === true) ||
+      chargingStation.isInAcceptedState() === true ||
+      (chargingStation.isInPendingState() === true &&
+        (params.triggerMessage === true || messageType === MessageType.CALL_RESULT_MESSAGE))
     ) {
       // eslint-disable-next-line @typescript-eslint/no-this-alias
       const self = this;