fix internal error when no files are sent

This commit is contained in:
Pierre Noël 2022-01-07 18:15:51 +01:00
parent 1b48050440
commit de5ee33b5a
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ module.exports = {
} finally {
if (Array.isArray(files)) {
await Promise.all(files.map(file => fse.remove(file.path)));
} else if (files.path) {
} else if (files && files.path) {
await fse.remove(files.path);
}
}

View File

@ -139,7 +139,7 @@ module.exports = {
} finally {
if (Array.isArray(files)) {
await Promise.all(files.map(file => fse.remove(file.path)));
} else if (files.path) {
} else if (files && files.path) {
await fse.remove(files.path);
}
}