-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deepmerge not working with Set #202
Comments
The current version of deepmerge is still using this naive object detection ( You probably want to pass This will cause the set to be used directly on the new object (not cloned). Related: #152 which is fixed in the v5 branch |
Can also use Array.from(#set) to get an array and then pass to deepmerge. #TehSrike do you suggest doing it in the library? |
@Gaurav2048 are you asking about having the library automatically convert sets to arrays? If so I don't think this should be supported as that would change the structure of the resulting object. I opened another issue (#204) a little while ago for handling |
If you want that kind of behavior, you would probably want to use |
@TehShrike I think it might be worth having a |
There might be traps in there somewhere but my initial reaction is that makes sense to me |
Problem
I am running into a problem using the JavaScript Set function that after merging two objects for some reason it's not keeping the array from set.
Here is the code:
Output:
Solution
We need to keep values from set. The output should looks like this:
The text was updated successfully, but these errors were encountered: