Fixes #55. ~I don't have a full understanding of the surrounding code, but the error I was getting seemed to be due to lodash's cloneDeep method not playing nicely with the CoreMongoose Array that we're now working with. Creating an array from that CoreMongoose array allows lodash to play nicely with it. Array.from only does a shallow clone, so we still need to deeply clone it before mucking with it to display the graph.~
@brussrus pointed out that the lodash.clonedeep module was using an older version of lodash (4.5). The project was already bundling lodash (4.17) via other dependencies, so I made that dependency explicit and used that instead of the old one. Long-term it might make sense to fully remove the lodash.clonedeep dependency, I think it's only used in one place.
Fixes #55. ~I don't have a full understanding of the surrounding code, but the error I was getting seemed to be due to lodash's
cloneDeep
method not playing nicely with the CoreMongoose Array that we're now working with. Creating an array from that CoreMongoose array allows lodash to play nicely with it.Array.from
only does a shallow clone, so we still need to deeply clone it before mucking with it to display the graph.~@brussrus pointed out that the
lodash.clonedeep
module was using an older version of lodash (4.5). The project was already bundling lodash (4.17) via other dependencies, so I made that dependency explicit and used that instead of the old one. Long-term it might make sense to fully remove thelodash.clonedeep
dependency, I think it's only used in one place.