From: Jérôme Benoit Date: Mon, 27 Mar 2023 21:26:26 +0000 (+0200) Subject: fix: avoid unscoped 'this' in static method X-Git-Tag: v1.2.0-2~5 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b30ea3f0e52c291362c3b0fc5dfa13c2696b9912;p=e-mobility-charging-stations-simulator.git fix: avoid unscoped 'this' in static method Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPServiceUtils.ts b/src/charging-station/ocpp/OCPPServiceUtils.ts index 26b7a4ee..f7a5d61c 100644 --- a/src/charging-station/ocpp/OCPPServiceUtils.ts +++ b/src/charging-station/ocpp/OCPPServiceUtils.ts @@ -136,7 +136,7 @@ export class OCPPServiceUtils { if (obj[key] instanceof Date) { (obj as JsonObject)[key] = (obj[key] as Date).toISOString(); } else if (obj[key] !== null && typeof obj[key] === 'object') { - this.convertDateToISOString(obj[key] as T); + OCPPServiceUtils.convertDateToISOString(obj[key] as T); } } }