mirror of
https://github.com/strapi/strapi.git
synced 2025-12-06 20:12:45 +00:00
fix internal error when no files are sent
This commit is contained in:
parent
1b48050440
commit
de5ee33b5a
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user