From b374fb469da45faf3b8b8c6b7e6798444aaf9848 Mon Sep 17 00:00:00 2001 From: "j.goderbauer" <j.goderbauer@adito.de> Date: Fri, 31 Aug 2018 15:04:17 +0200 Subject: [PATCH] =?UTF-8?q?avoid=20redundant=20function=20calls=20[Projekt?= =?UTF-8?q?:=20Entwicklung=20-=20Neon][TicketNr.:=201022526][Bereitstellun?= =?UTF-8?q?g=20erste=20Version=205.1=20Customizing=20f=C3=BCr=20Gremium]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entityfields/subject_details/valueProcess.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/entity/History_entity/entityfields/subject_details/valueProcess.js b/entity/History_entity/entityfields/subject_details/valueProcess.js index 8fd762534b..0a37a82465 100644 --- a/entity/History_entity/entityfields/subject_details/valueProcess.js +++ b/entity/History_entity/entityfields/subject_details/valueProcess.js @@ -2,6 +2,9 @@ import("system.vars"); import("system.result"); import("Keyword_lib"); -var kwdUtils; -kwdUtils = new KeywordUtils(); -result.string(vars.get("$field.SUBJECT") + " (" + kwdUtils.getViewValue("HISTORY.MEDIUM", vars.get("$field.MEDIUM")) + ")"); \ No newline at end of file +var kwdUtils, histMedium; +histMedium = vars.get("$field.MEDIUM"); +if (histMedium){ + kwdUtils = new KeywordUtils(); + result.string(vars.get("$field.SUBJECT") + " (" + kwdUtils.getViewValue("HISTORY.MEDIUM", histMedium) + ")"); +} \ No newline at end of file -- GitLab