diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index 7bc2ba1..750eb17 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -710,20 +710,16 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label return nil, errors.New("cannot connect to reserved keyword") } } } src := srcObj.EnsureChild(srcID) dst := dstObj.EnsureChild(dstID) - if src == dst { - return nil, errors.New("self-referencing connection") - } - edge := &Edge{ Attributes: Attributes{ Label: Scalar{ Value: label, }, }, Src: src, SrcArrow: srcArrow,