Connection Destroy: detecting when the document to destroy is an edge and deletes it accordingly