react-component / util

Common Utils For React Component
util.vercel.app
MIT License
623 stars 178 forks source link

Calling utils.merge that have the same object does not work #449

Closed HermanBilous closed 1 year ago

HermanBilous commented 1 year ago

We were using this package through ant-design and after the latest update we noticed that some of our forms are no longer working. Specifically, when data is loaded using apollo-client, we are passing an object that has multiple references to the same object, which is stored in apollo cache.

I forked the lib and provided the tests for this issue here: https://github.com/HermanBilous/util/commit/e1d724de6476e6eb65c295ef29c3c5784c140ecd

I'm assuming the issue occurs because the function is trying to get rid of recursive objects.

HermanBilous commented 1 year ago

Fixed by https://github.com/react-component/util/pull/451