protected constructor() {
this.ajv = new Ajv();
ajvFormats(this.ajv);
+ this.responseHandler.bind(this);
+ this.validateResponsePayload.bind(this);
}
public static getInstance<T extends OCPPResponseService>(this: new () => T): T {
- if (!OCPPResponseService.instance) {
+ if (OCPPResponseService.instance === null) {
OCPPResponseService.instance = new this();
}
return OCPPResponseService.instance as T;