From 7f7cd71a1717b39b2ac8aa6d85576b267f91d34b Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Wed, 17 Jun 2020 20:34:18 +0200 Subject: [PATCH] Don't show self loops --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index a0fbab5..1a3f0a9 100644 --- a/main.go +++ b/main.go @@ -516,6 +516,9 @@ func (h *graphHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { if toID, e := nodeMap[key]; e { for _, item := range references { if fromID, e := nodeMap[item.Name]; e { + if fromID == toID { + continue + } edge := Edge{ From: fromID, To: toID,