diff --git a/process/Context_lib/process.js b/process/Context_lib/process.js index c34bf0f9149c424e179bb383e2e77cbf0cefa2f6..9baeb09edf427b03d69e758329ea5d8d7f715bd6 100644 --- a/process/Context_lib/process.js +++ b/process/Context_lib/process.js @@ -161,24 +161,18 @@ ContextUtils.getContextConsumer = function(pContextId) ContextUtils.loadContentTitle = function(pEntity, pUid, pProvider) { if (!pUid) - { return ""; - } var conf = entities.createConfigForLoadingRows() - .entity(pEntity) - .uid(pUid) - .fields(["#CONTENTTITLE"]); + .entity(pEntity) + .uid(pUid) + .fields(["#CONTENTTITLE"]); if (pProvider) conf.provider(pProvider); - - if (entities.getRowCount(conf) > 0) - { - return entities.getRow(conf)["#CONTENTTITLE"]; - } - - return ""; + + var rows = entities.getRows(conf); + return rows.length === 1 ? rows[0]["#CONTENTTITLE"] : ""; } /**