Skip to content

Commit ac2e835

Browse files
graph: allow display of edgeless graphs
* Allow the graph view to display graphs which don't contain any edges.
1 parent ac3bf77 commit ac2e835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/views/Graph.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ export default {
493493
// generate a hash for this list of nodes and edges
494494
return nonCryptoHash(
495495
nodes.map(n => n.id).reduce((x, y) => { return x + y }) +
496-
edges.map(n => n.id).reduce((x, y) => { return x + y })
496+
edges.map(n => n.id).reduce((x, y) => { return x + y }, 1)
497497
)
498498
},
499499
reset () {
@@ -537,7 +537,7 @@ export default {
537537
const nodes = this.getGraphNodes()
538538
const edges = this.getGraphEdges()
539539
540-
if (!nodes.length || !edges.length) {
540+
if (!nodes.length) {
541541
// we can't graph this, reset and wait for something to draw
542542
this.graphID = null
543543
this.updating = false

0 commit comments

Comments
 (0)