anvaka / ngraph

Beautiful Graphs
MIT License
1.41k stars 131 forks source link

ngraph.merge issue #14

Closed rafaeltp closed 9 years ago

rafaeltp commented 9 years ago

I'm not exactly sure where to report this, but I'm getting an error when trying to merge with ngraph.merge.

The problem happens when I both arguments of merge have a container. Since the container is an object, it gets into the recursion. The problem is, this is infinity due to self reference in the container.

I worked it around by adding an extra condition:

else if (optionsValueType === 'object' && key != 'container')

This works for what I'm doing, but basically any object with a pointer to self would get into an infinity loop.

anvaka commented 9 years ago

Thank you for reporting this!

Can you help me to change goes deep test to reproduce the bug?

I'm closing it here, but please open one in the ngraph.merge repository.