From 3e93a60d4d95049d39f291ab59177cb37f792faa Mon Sep 17 00:00:00 2001
From: "j.goderbauer" <j.goderbauer@adito.de>
Date: Wed, 2 Oct 2019 15:49:01 +0200
Subject: [PATCH] fixed some errors when defining very simple contexts for
 360degree

---
 .../360Degree_entity/recordcontainers/jdito/contentProcess.js  | 2 +-
 process/Context_lib/process.js                                 | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js
index 92fef480e51..9eb59464b96 100644
--- a/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js
+++ b/entity/360Degree_entity/recordcontainers/jdito/contentProcess.js
@@ -68,7 +68,7 @@ function _get360Data(pSelectMap, pBaseContextId, pContactId, pContextList, pActi
                 record[5] = translate.text(pActive);
             else
             {
-               if(pSelectMap[context].activeStates.indexOf(row[3]) > -1)    
+               if(pSelectMap[context].activeStates && pSelectMap[context].activeStates.indexOf(row[3]) > -1)    
                   record[5] = translate.text("true");
                else
                   record[5] = translate.text("false");
diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js
index b9e558392fa..8976e941145 100644
--- a/process/Context_lib/process.js
+++ b/process/Context_lib/process.js
@@ -294,6 +294,9 @@ ContextSelector.create = function(pTableName, pIdField, pTitleExpression)
  */
 ContextSelector.prototype.getFullField = function(pField)
 {
+    //always keep undefined (and null) just undefined since it's never a fullQualifier and tablename.undefined is useless
+    if (pField == undefined)
+        return undefined;
     if (SqlUtils.isFullFieldQualifier(pField))
         return pField;
     else
-- 
GitLab