refactor: cleanup control flow in OCPP stack
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 19 Nov 2023 15:51:11 +0000 (16:51 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 19 Nov 2023 15:51:11 +0000 (16:51 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/OCPPRequestService.ts

index f1ea87112dcfbfaed5fb261418e0cd5d396df5e3..0d59131fd157804c3de02cd4037fde289d82beed 100644 (file)
@@ -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) {