mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
chore: Swap negative if condition
This commit is contained in:
parent
ced5cef2a3
commit
ce8256b8f6
@ -787,6 +787,7 @@ const destructEdgeType = (type: string | undefined) => {
|
||||
}
|
||||
return { arrowTypeStart, arrowTypeEnd };
|
||||
};
|
||||
|
||||
const addNodeFromVertex = (
|
||||
vertex: FlowVertex,
|
||||
nodes: Node[],
|
||||
@ -799,7 +800,11 @@ const addNodeFromVertex = (
|
||||
const isGroup = subGraphDB.get(vertex.id) || false;
|
||||
|
||||
const node = findNode(nodes, vertex.id);
|
||||
if (!node) {
|
||||
if (node) {
|
||||
node.cssStyles = vertex.styles;
|
||||
node.cssCompiledStyles = getCompiledStyles(vertex.classes);
|
||||
node.cssClasses = vertex.classes.join(' ');
|
||||
} else {
|
||||
nodes.push({
|
||||
id: vertex.id,
|
||||
label: vertex.text,
|
||||
@ -818,10 +823,6 @@ const addNodeFromVertex = (
|
||||
linkTarget: vertex.linkTarget,
|
||||
tooltip: getTooltip(vertex.id),
|
||||
});
|
||||
} else {
|
||||
node.cssStyles = vertex.styles;
|
||||
node.cssCompiledStyles = getCompiledStyles(vertex.classes);
|
||||
node.cssClasses = vertex.classes.join(' ');
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user