private getConfigurationFromFile(): ChargingStationConfiguration | undefined {
let configuration: ChargingStationConfiguration | undefined;
- if (this.configurationFile && fs.existsSync(this.configurationFile)) {
+ if (Utils.isNotEmptyString(this.configurationFile) && fs.existsSync(this.configurationFile)) {
try {
if (this.sharedLRUCache.hasChargingStationConfiguration(this.configurationFileHash)) {
configuration = this.sharedLRUCache.getChargingStationConfiguration(
private saveConfiguration(
chargingStationAutomaticTransactionGeneratorConfiguration?: ChargingStationAutomaticTransactionGeneratorConfiguration
): void {
- if (this.configurationFile) {
+ if (Utils.isNotEmptyString(this.configurationFile)) {
try {
if (!fs.existsSync(path.dirname(this.configurationFile))) {
fs.mkdirSync(path.dirname(this.configurationFile), { recursive: true });