From e973ef67a2281b845b1cb0b4a6daf14eca094954 Mon Sep 17 00:00:00 2001 From: Philipp Kuhlmay Date: Mon, 8 Apr 2024 18:20:41 +0200 Subject: [PATCH] fix for old names from v11 or earlier --- .../helper/converter/convertModulesToNodes.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Build/Sources/helper/converter/convertModulesToNodes.js b/Build/Sources/helper/converter/convertModulesToNodes.js index 6330bc4e..8ca46c2c 100644 --- a/Build/Sources/helper/converter/convertModulesToNodes.js +++ b/Build/Sources/helper/converter/convertModulesToNodes.js @@ -58,7 +58,7 @@ function convertModulesToNodes(modules) { y: item.config.position[1] }, data: { - label: item.name, + label: getModelName(item), objectType: "foobar", isAggregateRoot: item.value.objectsettings.aggregateRoot, enableSorting: item.value.objectsettings.sorting, @@ -99,6 +99,18 @@ function convertModulesToNodes(modules) { return result; } +/** + * Workaround for older versions. In version 11 the name was stored inside value.name, not it is stored in name. + */ +function getModelName(item) { + console.log("item"); + console.log(item); + if(item.name == 'New Model Object') { + return item.value.name; + } + return item.name; +} + export default convertModulesToNodes; /*