More strict boolean checks
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16ResponseService.ts
index 1dc583dbb87736ace93e3caba5186ea26c2a5022..4ba89706feb8a4a38a52edcad386f880122090e9 100644 (file)
@@ -174,10 +174,13 @@ export default class OCPP16ResponseService extends OCPPResponseService {
     payload: JsonType,
     requestPayload: JsonType
   ): Promise<void> {
-    if (chargingStation.isRegistered() || commandName === OCPP16RequestCommand.BOOT_NOTIFICATION) {
+    if (
+      chargingStation.isRegistered() === true ||
+      commandName === OCPP16RequestCommand.BOOT_NOTIFICATION
+    ) {
       if (
-        this.responseHandlers.has(commandName) &&
-        OCPP16ServiceUtils.isRequestCommandSupported(chargingStation, commandName)
+        this.responseHandlers.has(commandName) === true &&
+        OCPP16ServiceUtils.isRequestCommandSupported(chargingStation, commandName) === true
       ) {
         try {
           this.validatePayload(chargingStation, commandName, payload);