X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2F1.6%2FOCPP16IncomingRequestService.ts;h=37457ceea91c3549dd69b593602a8d67ece7d7a4;hb=c0f4be747574980ada77fd4be1c691637fa69347;hp=ef1c7db2e8d96b8c8dfb57edad7976e82a455a21;hpb=e7aeea18e189dd087c8f951cf77a253e2818ae90;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts index ef1c7db2..37457cee 100644 --- a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts @@ -732,9 +732,9 @@ export default class OCPP16IncomingRequestService extends OCPPIncomingRequestSer ftpClient = new Client(); const accessResponse = await ftpClient.access({ host: uri.host, - ...(uri.port !== '' && { port: Utils.convertToInt(uri.port) }), - ...(uri.username !== '' && { user: uri.username }), - ...(uri.password !== '' && { password: uri.password }), + ...(!Utils.isEmptyString(uri.port) && { port: Utils.convertToInt(uri.port) }), + ...(!Utils.isEmptyString(uri.username) && { user: uri.username }), + ...(!Utils.isEmptyString(uri.password) && { password: uri.password }), }); let uploadResponse: FTPResponse; if (accessResponse.code === 220) {