Empty string handling fixes
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStation.ts
index ddaff652478e6d6898eef112dd3fcc6b2713add9..276c836866970585c2cef6923c6dfd1dcb89a746 100644 (file)
@@ -511,7 +511,7 @@ export default class ChargingStation {
           this.templateFile,
           null,
           (event, filename): void => {
-            if (filename && event === 'change') {
+            if (!Utils.isEmptyString(filename) && event === 'change') {
               try {
                 logger.debug(
                   `${this.logPrefix()} ${FileType.ChargingStationTemplate} ${