mirror of
https://github.com/nodemailer/wildduck.git
synced 2025-11-09 16:01:06 +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)
|
this.asyncAuthenticate(username, password, requiredScope, meta)
|
||||||
.catch(err => callback(err))
|
.catch(err => callback(err))
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
if (!Array.isArray(result)) {
|
||||||
|
result = [].concat(result || [false, false]);
|
||||||
|
}
|
||||||
callback(null, ...result);
|
callback(null, ...result);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue