You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In areEqual, there is a branch where the valueOf both objects is compared if supported, but the check for if it's supported raises an exception if the objects don't have the Object prototype.
Specifically, since it does a.hasOwnProperty("valueOf"), if a doesn't have a hasOwnProperty method it will fail.
It's possible the solution would be to use Object.hasOwnProperty.call(a, "valueOf") instead, but I'm not clear on any semantic differences there might be. If that's acceptable, I can open a pull request.
For some context, I ran into this issue when passing a value from another library to Relay's RecordProxy.setValue. That other library happens to create some objects like Object.create(null).
The text was updated successfully, but these errors were encountered:
In
areEqual
, there is a branch where thevalueOf
both objects is compared if supported, but the check for if it's supported raises an exception if the objects don't have theObject
prototype.Specifically, since it does
a.hasOwnProperty("valueOf")
, ifa
doesn't have ahasOwnProperty
method it will fail.It's possible the solution would be to use
Object.hasOwnProperty.call(a, "valueOf")
instead, but I'm not clear on any semantic differences there might be. If that's acceptable, I can open a pull request.For some context, I ran into this issue when passing a value from another library to Relay's
RecordProxy.setValue
. That other library happens to create some objects likeObject.create(null)
.The text was updated successfully, but these errors were encountered: