From 54668c92bada8c3e4aeacf3f52328b2b1eb0189b Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 1 Oct 2021 11:16:31 -0700 Subject: [PATCH] remove asserts when sendmail disabled --- src/apps.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/apps.js b/src/apps.js index dc2d8095d..2f23cdb55 100644 --- a/src/apps.js +++ b/src/apps.js @@ -1478,10 +1478,7 @@ async function setMailbox(app, data, auditSource) { assert.strictEqual(typeof auditSource, 'object'); const { enable, mailboxDomain } = data; - let mailboxName = data.mailboxName; assert.strictEqual(typeof enable, 'boolean'); - assert(mailboxName === null || typeof mailboxName === 'string'); - assert.strictEqual(typeof mailboxDomain, 'string'); const appId = app.id; let error = checkAppState(app, exports.ISTATE_PENDING_RECREATE_CONTAINER); @@ -1491,6 +1488,7 @@ async function setMailbox(app, data, auditSource) { await mail.getDomain(mailboxDomain); // check if domain exists + let mailboxName = data.mailboxName; if (mailboxName) { error = mail.validateName(mailboxName); if (error) throw new BoxError(BoxError.BAD_FIELD, error.message, { field: 'mailboxName' });