diff --git a/.changeset/weak-files-stare.md b/.changeset/weak-files-stare.md index cbce03b8e..80440fe05 100644 --- a/.changeset/weak-files-stare.md +++ b/.changeset/weak-files-stare.md @@ -2,4 +2,4 @@ 'mermaid': patch --- -patch: updated mindmapdb to use class based approach +patch: Update MindmapDB to use class based approach diff --git a/packages/mermaid/src/diagrams/mindmap/mindmapDb.ts b/packages/mermaid/src/diagrams/mindmap/mindmapDb.ts index 7a151d9c0..703ba8434 100644 --- a/packages/mermaid/src/diagrams/mindmap/mindmapDb.ts +++ b/packages/mermaid/src/diagrams/mindmap/mindmapDb.ts @@ -18,7 +18,7 @@ const nodeType = { export class MindmapDB { private nodes: MindmapNode[] = []; - private cnt = 0; + private count = 0; private elements: Record = {}; public readonly nodeType: typeof nodeType; @@ -36,7 +36,7 @@ export class MindmapDB { } public clear() { this.nodes = []; - this.cnt = 0; + this.count = 0; this.elements = {}; } @@ -68,7 +68,7 @@ export class MindmapDB { } const node: MindmapNode = { - id: this.cnt++, + id: this.count++, nodeId: sanitizeText(id, conf), level, descr: sanitizeText(descr, conf),