file,
null,
(event, filename) => {
- if (filename && event === 'change') {
+ if (!Utils.isEmptyString(filename) && event === 'change') {
try {
logger.debug(
`${this.logPrefix(file)} ${FileType.Authorization} file have changed, reload`
this.templateFile,
null,
(event, filename): void => {
- if (filename && event === 'change') {
+ if (!Utils.isEmptyString(filename) && event === 'change') {
try {
logger.debug(
`${this.logPrefix()} ${FileType.ChargingStationTemplate} ${
if (!Utils.isUndefined(template[key])) {
logger.warn(
`${logPrefix} Deprecated template key '${key}' usage in file '${templateFile}'${
- logMsgToAppend && `. ${logMsgToAppend}`
+ !Utils.isEmptyString(logMsgToAppend) && `. ${logMsgToAppend}`
}`
);
}
) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage in section '${sectionName}'${
- logMsgToAppend && `. ${logMsgToAppend}`
+ logMsgToAppend.trim().length !== 0 && `. ${logMsgToAppend}`
}}`
);
} else if (!Configuration.isUndefined(Configuration.getConfig()[key])) {
console.error(
chalk`{green ${Configuration.logPrefix()}} {red Deprecated configuration key '${key}' usage${
- logMsgToAppend && `. ${logMsgToAppend}`
+ logMsgToAppend.trim().length !== 0 && `. ${logMsgToAppend}`
}}`
);
}