-
Notifications
You must be signed in to change notification settings - Fork 15
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
equal Hard Erroring on Proxies #452
Comments
@Tmktahu Thanks for filing this issue. If you have the time, it would be great if you could open a PR with a failing test case here (without involving Apollo Client). I'm hoping to understand what specific kind of |
@benjamn it's tricky to make a failing test since I'm not 100% sure what specifically about the Proxies are causing it to fail. I've made a PR that I think showcases the problem case. After fiddling around, the problem seems to stem from the Proxy's get function. Despite the objects appearing identical via the Hopefully the case I outlined here is the one that is happening in Apollo Client. |
I discovered this from Apollo Client.
In some cases, the parameters passed to the
equal
method are wrapped in Proxies. If the wrapped value is an object with a nested array, it hard errors on this specific line with the following error:TypeError: 'get' on proxy: property 'nestedArrayPropertyName' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '[object Array]' but got '[object Array]')
The text was updated successfully, but these errors were encountered: