Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Commit

Permalink
Replace deprecated string helper usage
Browse files Browse the repository at this point in the history
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
  • Loading branch information
Jérôme Benoit committed Mar 8, 2022
1 parent dc343b4 commit de1ec47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/charging-station/ChargingStation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,14 +653,13 @@ export default class ChargingStation {
// In case of multiple instances: add instance index to charging station id
const instanceIndex = process.env.CF_INSTANCE_INDEX ?? 0;
const idSuffix = stationTemplate.nameSuffix ?? '';
const idStr = '000000000' + this.index.toString();
return stationTemplate.fixedName
? stationTemplate.baseName
: stationTemplate.baseName +
'-' +
instanceIndex.toString() +
('000000000' + this.index.toString()).substr(
('000000000' + this.index.toString()).length - 4
) +
idStr.substring(idStr.length - 4) +
idSuffix;
}

Expand Down

0 comments on commit de1ec47

Please sign in to comment.