mirror of
https://github.com/lana-k/sqliteviz.git
synced 2026-03-24 15:06:17 +08:00
skip node if there is no node id
This commit is contained in:
@@ -45,10 +45,12 @@ export function buildNodes(graph, dataSources, options) {
|
||||
.map(json => JSON.parse(json))
|
||||
.filter(item => item[objectType] === TYPE_NODE)
|
||||
nodes.forEach(node => {
|
||||
graph.addNode(node[nodeId], {
|
||||
data: node,
|
||||
labelColor: options.style.nodes.label.color
|
||||
})
|
||||
if (node[nodeId]) {
|
||||
graph.addNode(node[nodeId], {
|
||||
data: node,
|
||||
labelColor: options.style.nodes.label.color
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user