mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 02:09:50 +02:00
Fixed nodes duplicates
This commit is contained in:
@@ -92,12 +92,14 @@ class Node {
|
||||
*/
|
||||
const addNode = function(ID: string): Node {
|
||||
ID = common.sanitizeText(ID, configApi.getConfig());
|
||||
let node: Node;
|
||||
if (nodesHash[ID] === undefined) {
|
||||
nodesHash[ID] = new Node(ID);
|
||||
node = new Node(ID);
|
||||
nodesHash[ID] = node;
|
||||
nodes.push(node);
|
||||
} else {
|
||||
node = nodesHash[ID];
|
||||
}
|
||||
const node = nodesHash[ID];
|
||||
nodes.push(node);
|
||||
// debugger;
|
||||
return node;
|
||||
};
|
||||
|
||||
|
@@ -99,7 +99,6 @@ export const draw = function (text: string, id: string, _version: string, diagOb
|
||||
graph.links.push({source: link.source.ID, target: link.target.ID, value: link.value});
|
||||
});
|
||||
|
||||
|
||||
debugger;
|
||||
// const graph = {
|
||||
// nodes: [
|
||||
|
Reference in New Issue
Block a user