1
0
Fork 0
mirror of synced 2024-10-02 01:56:57 +13:00

Fix for issue #2593.

This commit is contained in:
mike12345567 2021-09-13 09:00:14 +01:00
parent 16ab8098cb
commit 67c07b7e38

View file

@ -67,6 +67,9 @@ function getDocParams(docType, docId = null, otherProps = {}) {
* @return {null|string} The tenant ID found within the app ID. * @return {null|string} The tenant ID found within the app ID.
*/ */
exports.getTenantIDFromAppID = appId => { exports.getTenantIDFromAppID = appId => {
if (!appId) {
return null
}
const split = appId.split(SEPARATOR) const split = appId.split(SEPARATOR)
const hasDev = split[1] === DocumentTypes.DEV const hasDev = split[1] === DocumentTypes.DEV
if ((hasDev && split.length === 3) || (!hasDev && split.length === 2)) { if ((hasDev && split.length === 3) || (!hasDev && split.length === 2)) {