From 7b60b752ddfeb2aadf220fc55a8447fd5b0ffe58 Mon Sep 17 00:00:00 2001 From: reun Date: Fri, 16 Nov 2018 23:28:07 +0100 Subject: [PATCH] fix empty interfaces --- src/PumlConverter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PumlConverter.js b/src/PumlConverter.js index 3eaaf87..63cf8b7 100644 --- a/src/PumlConverter.js +++ b/src/PumlConverter.js @@ -18,7 +18,8 @@ function createComponents(bundle) { const components = bundle.getComponents(); for (let component of components) { let interfaces = component.getInterfaces(); - result += `[${component.getName()}] <<${interfaces.join(",")}>> + let interfacesString = interfaces.length ? ` <<${interfaces.join(",")}>>` : "" + result += `[${component.getName()}]${interfacesString} `; } return result; @@ -32,7 +33,7 @@ function createReferences(bundle) { for (let interface of references) { const refComponents = bundle.getComponentsByInterface(interface); for (let refComponent of refComponents) { - result += `[${component.getName()}] -> [${refComponent.getName()}] + result += `[${component.getName()}] --> [${refComponent.getName()}] `; } }