Skip to content

Commit

Permalink
fix empty interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
reun committed Nov 16, 2018
1 parent 6a0b351 commit 7b60b75
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PumlConverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()}]
`;
}
}
Expand Down

0 comments on commit 7b60b75

Please sign in to comment.