From e2baeffc85dcc52c9b7c96a0f3de1a52e7ef5b89 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 7 Mar 2024 11:05:46 +0100 Subject: [PATCH] build: fix linter error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/OCPPRequestService.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 57f6a061..4d279ade 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -303,7 +303,7 @@ export abstract class OCPPRequestService { } const handleSendError = (ocppError: OCPPError): void => { - if (params?.skipBufferingOnError === false) { + if (params.skipBufferingOnError === false) { // Buffer chargingStation.bufferMessage(messageToSend) if (messageType === MessageType.CALL_MESSAGE) { @@ -317,7 +317,7 @@ export abstract class OCPPRequestService { ) } } else if ( - params?.skipBufferingOnError === true && + params.skipBufferingOnError === true && messageType === MessageType.CALL_MESSAGE ) { // Remove request from the cache @@ -346,7 +346,7 @@ export abstract class OCPPRequestService { `Timeout ${formatDurationMilliSeconds( OCPPConstants.OCPP_WEBSOCKET_TIMEOUT )} reached for ${ - params?.skipBufferingOnError === false ? '' : 'non ' + params.skipBufferingOnError === false ? '' : 'non ' }buffered message id '${messageId}' with content '${messageToSend}'`, commandName, (messagePayload as OCPPError).details @@ -380,7 +380,7 @@ export abstract class OCPPRequestService { new OCPPError( ErrorType.GENERIC_ERROR, `WebSocket errored for ${ - params?.skipBufferingOnError === false ? '' : 'non ' + params.skipBufferingOnError === false ? '' : 'non ' }buffered message id '${messageId}' with content '${messageToSend}'`, commandName, { name: error.name, message: error.message, stack: error.stack } @@ -393,7 +393,7 @@ export abstract class OCPPRequestService { new OCPPError( ErrorType.GENERIC_ERROR, `WebSocket closed for ${ - params?.skipBufferingOnError === false ? '' : 'non ' + params.skipBufferingOnError === false ? '' : 'non ' }buffered message id '${messageId}' with content '${messageToSend}'`, commandName, (messagePayload as OCPPError).details -- 2.34.1