Don't show self loops
This commit is contained in:
parent
a28f634ece
commit
7f7cd71a17
3
main.go
3
main.go
|
@ -516,6 +516,9 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
if toID, e := nodeMap[key]; e {
|
if toID, e := nodeMap[key]; e {
|
||||||
for _, item := range references {
|
for _, item := range references {
|
||||||
if fromID, e := nodeMap[item.Name]; e {
|
if fromID, e := nodeMap[item.Name]; e {
|
||||||
|
if fromID == toID {
|
||||||
|
continue
|
||||||
|
}
|
||||||
edge := Edge{
|
edge := Edge{
|
||||||
From: fromID,
|
From: fromID,
|
||||||
To: toID,
|
To: toID,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user