Fix crash because mailboxName is null

mailboxName is always a non-empty string. even for apps that don't use
it, we allocate a mailbox with .app suffix
This commit is contained in:
Girish Ramakrishnan
2019-03-02 19:07:49 -08:00
parent d04628a42d
commit 598a9664a7
3 changed files with 30 additions and 2 deletions

View File

@@ -265,6 +265,7 @@ function add(id, appStoreId, manifest, location, domain, ownerId, portBindings,
assert.strictEqual(typeof ownerId, 'string');
assert.strictEqual(typeof portBindings, 'object');
assert(data && typeof data === 'object');
assert(typeof data.mailboxName === 'string' && data.mailboxName); // non-empty string
assert.strictEqual(typeof callback, 'function');
portBindings = portBindings || { };
@@ -281,7 +282,7 @@ function add(id, appStoreId, manifest, location, domain, ownerId, portBindings,
var robotsTxt = 'robotsTxt' in data ? data.robotsTxt : null;
var debugModeJson = data.debugMode ? JSON.stringify(data.debugMode) : null;
var env = data.env || {};
const mailboxName = data.mailboxName || null;
const mailboxName = data.mailboxName;
var queries = [];