From: Jérôme Benoit Date: Sun, 19 Nov 2023 15:51:11 +0000 (+0100) Subject: refactor: cleanup control flow in OCPP stack X-Git-Tag: v1.2.25~3 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=69dae411c7e64a265f8199ef149b745dff595ed7;p=e-mobility-charging-stations-simulator.git refactor: cleanup control flow in OCPP stack Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index f1ea8711..0d59131f 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -443,9 +443,8 @@ export abstract class OCPPRequestService { responseCallback, errorCallback, ); - } - // Resolve response - if (messageType !== MessageType.CALL_MESSAGE) { + } else { + // Resolve response return resolve(messagePayload); } } else if (error) {