From d2c7d424de61b68ebe52a0382e8f8f3312b50728 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 13 Sep 2021 09:00:14 +0100 Subject: [PATCH] Fix for issue #2593. --- packages/auth/src/db/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/auth/src/db/utils.js b/packages/auth/src/db/utils.js index 99aef0287d..4c4bae565b 100644 --- a/packages/auth/src/db/utils.js +++ b/packages/auth/src/db/utils.js @@ -67,6 +67,9 @@ function getDocParams(docType, docId = null, otherProps = {}) { * @return {null|string} The tenant ID found within the app ID. */ exports.getTenantIDFromAppID = appId => { + if (!appId) { + return null + } const split = appId.split(SEPARATOR) const hasDev = split[1] === DocumentTypes.DEV if ((hasDev && split.length === 3) || (!hasDev && split.length === 2)) {