Skip to content

Commit cf9e990

Browse files
committed
Fix case with no attribute type
1 parent 9435e2d commit cf9e990

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/utils/sharedUtils.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@ export function getDbLabel(
101101
);
102102
let attributesTypes = attributeType.split(" ");
103103
let attributeComment: string | null = null;
104+
attributeType = attributesTypes[0];
105+
if (attributeType === "") {
106+
attributeType = "NONE";
107+
}
104108
if (attributesTypes.length > 1) {
105109
attributeComment = attributesTypes.slice(1).join(' ');
106-
attributeType = attributesTypes[0];
107-
} else {
108-
attributeType = "NONE";
109110
}
110111

111112
const attribute = {
@@ -193,7 +194,7 @@ export function getMermaidDiagramDb(
193194
if (mxcell.style && (mxcell.style.trim().startsWith("swimlane;")
194195
|| mxcell.style.trim().startsWith("shape=table;"))
195196
) {
196-
let entityName = mxcell.value.toString();
197+
let entityName = removeHtml(mxcell.value.toString());
197198
let description = "";
198199
let formatValue = "";
199200
if (

0 commit comments

Comments
 (0)