fix: check client.email exists
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
fe95c45c42
commit
931a891f71
|
@ -25,10 +25,9 @@ module.exports = Self => {
|
||||||
|
|
||||||
const client = await Self.app.models.Client.findById(id, myOptions);
|
const client = await Self.app.models.Client.findById(id, myOptions);
|
||||||
|
|
||||||
const emails = client.email ? client.email.split(',') : null;
|
|
||||||
|
|
||||||
const findParams = [];
|
const findParams = [];
|
||||||
if (emails.length) {
|
if (client.email) {
|
||||||
|
const emails = client.email.split(',');
|
||||||
for (let email of emails)
|
for (let email of emails)
|
||||||
findParams.push({email: email});
|
findParams.push({email: email});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue