Skip to content
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

util.merge breaks Proxies #390

Open
Kreijstal opened this issue Feb 17, 2022 · 4 comments
Open

util.merge breaks Proxies #390

Kreijstal opened this issue Feb 17, 2022 · 4 comments

Comments

@Kreijstal
Copy link

Is there any reason for util.merge to simply not use {...obj1,...obj2}?

@jonschlinkert
Copy link
Member

Doesn't spreading also deference an object?

@Kreijstal
Copy link
Author

Kreijstal commented Feb 17, 2022

if the obj itself is a proxy, sure, but if the object has attirbutes that point to Proxy objects, then they're preserved, unlike util.merge implementation

@jonschlinkert
Copy link
Member

Okay, that makes sense. I use proxies myself, so I appreciate this point. Want to do a PR?

@Kreijstal
Copy link
Author

so I cloned it, did a test, banged my head a few times because it worked perfectly, then... it turns out it was already fixed in #308 .... however... which was fixed 2 years ago...
it turns out, if you simply npm install it, you get the outdated version with that bug, I npm installed it, and the bug reappears..., update it on npm, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants