From 94b034c6052e52d091b3f81e429a6a7413fc6f8e Mon Sep 17 00:00:00 2001 From: Yamel Senih Date: Fri, 15 May 2020 15:22:21 -0400 Subject: [PATCH] Fixed error with unnecessary call for context (#496) --- src/utils/ADempiere/contextUtils.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/utils/ADempiere/contextUtils.js b/src/utils/ADempiere/contextUtils.js index 4f1a4505..2007ad73 100644 --- a/src/utils/ADempiere/contextUtils.js +++ b/src/utils/ADempiere/contextUtils.js @@ -201,13 +201,15 @@ export function getPreference({ // USER PREFERENCES // View Preferences - retValue = getContext({ - parentUuid: 'P' + parentUuid, - containerUuid, - columnName: columnName - }) - if (!isEmptyValue(retValue)) { - return retValue + if (parentUuid && containerUuid) { + retValue = getContext({ + parentUuid: 'P' + parentUuid, + containerUuid, + columnName: columnName + }) + if (!isEmptyValue(retValue)) { + return retValue + } } // Global Preferences