mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-09-28 16:08:31 +08:00
make sure that auth result is an array
This commit is contained in:
parent
164f77feed
commit
afacc1df07
1 changed files with 3 additions and 0 deletions
|
@ -370,6 +370,9 @@ class UserHandler {
|
|||
this.asyncAuthenticate(username, password, requiredScope, meta)
|
||||
.catch(err => callback(err))
|
||||
.then(result => {
|
||||
if (!Array.isArray(result)) {
|
||||
result = [].concat(result || [false, false]);
|
||||
}
|
||||
callback(null, ...result);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue