Added catch on imagemin
This commit is contained in:
parent
3e466925d6
commit
cd11c01c9b
1 changed files with 26 additions and 22 deletions
|
@ -49,6 +49,8 @@ class Aws {
|
|||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
(async () => {
|
||||
const file = await imagemin([newFile], '/tmp', {
|
||||
plugins: [
|
||||
|
@ -67,6 +69,8 @@ class Aws {
|
|||
fs.unlink(file[0].path, () => { })
|
||||
})
|
||||
})()
|
||||
}
|
||||
catch (callback)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue