Apply dependencies update
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPResponseService.ts
index 3faa4351e7ef8867096c2844ef5d243110dcfb0d..9654b2d7b93601e008001d0cca049bec31dca58c 100644 (file)
@@ -13,7 +13,7 @@ const moduleName = 'OCPPResponseService';
 
 export default abstract class OCPPResponseService {
   private static instance: OCPPResponseService | null = null;
-  private ajv: Ajv;
+  private readonly ajv: Ajv;
 
   protected constructor() {
     this.ajv = new Ajv();
@@ -35,7 +35,7 @@ export default abstract class OCPPResponseService {
     schema: JSONSchemaType<T>,
     payload: T
   ): boolean {
-    if (!chargingStation.getPayloadSchemaValidation()) {
+    if (chargingStation.getPayloadSchemaValidation() === false) {
       return true;
     }
     const validate = this.ajv.compile(schema);