Added catch on imagemin

This commit is contained in:
dbroqua 2019-03-12 22:50:05 +01:00
parent 3e466925d6
commit cd11c01c9b

View file

@ -49,6 +49,8 @@ class Aws {
return false return false
} }
try {
(async () => { (async () => {
const file = await imagemin([newFile], '/tmp', { const file = await imagemin([newFile], '/tmp', {
plugins: [ plugins: [
@ -67,6 +69,8 @@ class Aws {
fs.unlink(file[0].path, () => { }) fs.unlink(file[0].path, () => { })
}) })
})() })()
}
catch (callback)
}) })
} }