do not use .finally() because of Node v8

This commit is contained in:
Andris Reinman 2019-10-01 16:27:10 +03:00
parent bc23a35119
commit 7c5bf84c52

View file

@ -493,15 +493,20 @@ class MessageHandler {
} }
}; };
return processAudits().finally(() => { let next = () => {
return cleanup(null, true, { cleanup(null, true, {
uidValidity, uidValidity,
uid, uid,
id: messageData._id, id: messageData._id,
mailbox: mailboxData._id, mailbox: mailboxData._id,
status: 'new' status: 'new'
}); });
}); };
// do not use more suitable .finally() as it is not supported in Node v8
return processAudits()
.then(next)
.catch(next);
} }
); );
}); });