mirror of
https://github.com/simon987/music-graph-ui.git
synced 2025-04-10 14:06:41 +00:00
Don't mark as expanded if no related nodes
This commit is contained in:
parent
0a1868c4e3
commit
bb31e865a4
@ -183,8 +183,10 @@ export function MusicGraph(data) {
|
||||
fn: (d) => {
|
||||
this.api.getRelatedByMbid(d.mbid)
|
||||
.then(data => {
|
||||
this.expandedNodes.add(d.id)
|
||||
this.addNodes(data.newNodes, data.relations, d.id)
|
||||
if (data.newNodes.length > 0) {
|
||||
this.expandedNodes.add(d.id)
|
||||
this.addNodes(data.newNodes, data.relations, d.id)
|
||||
}
|
||||
d.relatedExpanded = true
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user