dominikbraun / graph

A library for creating generic graph data structures and modifying, analyzing, and visualizing them.
https://graph.dominikbraun.io
Apache License 2.0
1.77k stars 95 forks source link

fix: update the Attributes map, instead of using the map provided by the user, preventing two maps from actually being the same reference (issue #177) #179

Open tzq0301 opened 1 month ago

tzq0301 commented 1 month ago

In issue https://github.com/dominikbraun/graph/issues/177, every new Vertex will contain the same map declared in redVertexAttr, which causes the unexcepted behaviour in the issue.