-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix: replaceDeepEqual for objects created by Object.create #7357
fix: replaceDeepEqual for objects created by Object.create #7357
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 84e3848:
|
3afbab5
to
bc4f4e5
Compare
This PR should be ready. @TkDodo could you please take a look? |
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 84e3848. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
Currently, objects with custom prototypes (created using
Object.create(...)
) are dealt with as plain objects. That causes them to be copied without the prototype in case of refetch / invalidation and results in buggy behaviour. This is problematic when using together with https://github.com/Effect-TS/effect (e.gOption
,Either
, ... data structures).BTW, based on the test suite, it might cover other checks like
prot.hasOwnProperty('isPrototypeOf')
so the impl ofisPlainObject
could be refactored a little but I'm honestly not 100% sure.