mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-03-01 18:35:09 +08:00
do not use .finally() because of Node v8
This commit is contained in:
parent
bc23a35119
commit
7c5bf84c52
1 changed files with 8 additions and 3 deletions
|
@ -493,15 +493,20 @@ class MessageHandler {
|
|||
}
|
||||
};
|
||||
|
||||
return processAudits().finally(() => {
|
||||
return cleanup(null, true, {
|
||||
let next = () => {
|
||||
cleanup(null, true, {
|
||||
uidValidity,
|
||||
uid,
|
||||
id: messageData._id,
|
||||
mailbox: mailboxData._id,
|
||||
status: 'new'
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
// do not use more suitable .finally() as it is not supported in Node v8
|
||||
return processAudits()
|
||||
.then(next)
|
||||
.catch(next);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue