Fix remaining linter errors properly
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16IncomingRequestService.ts
index ef1c7db2e8d96b8c8dfb57edad7976e82a455a21..37457ceea91c3549dd69b593602a8d67ece7d7a4 100644 (file)
@@ -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) {