You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2021/08/16 09:50:25 UTC

[brooklyn-ui] 02/03: better identifier format

This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git

commit e550cc64f376ad0a7a152943f0c582f9f886da45
Author: John Athanasiou <ja...@users.noreply.github.com>
AuthorDate: Mon Aug 16 10:23:22 2021 +0100

    better identifier format
---
 .../blueprint-composer/app/components/dsl-editor/dsl-editor.js       | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js b/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
index ec9c957..4609cf8 100644
--- a/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
+++ b/ui-modules/blueprint-composer/app/components/dsl-editor/dsl-editor.js
@@ -307,8 +307,9 @@ export function dslEditorDirective($rootScope, $filter, $log, brUtilsGeneral, bl
 
         // filtering with both own and parent's ID in case we have same-type child nodes
         return items.filter(({ id, entity }) => {
-            if (IDs.has(id+entity.id)) return false;
-            IDs.add(id+entity.id);
+            const marker = id + ':' + (entity.id || '-');
+            if (IDs.has(marker)) return false;
+            IDs.add(marker);
             return true;
         })
     }