Fixed bug

This commit is contained in:
dbroqua 2019-03-12 22:51:32 +01:00
parent cd11c01c9b
commit 43a5234ab3

View file

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