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
Error when rebuilding Date with patches #676
Comments
I got a bug too here, but don't have the same problem, Wehn I applyPatches with date, and then do a date.getDate, I Have I found where the issue happen in Patches.ts in the function deepClonePatchValue
should be
It solved the issue for me |
Looks like the |
Any idea of a workaround while this bug is fix ? |
Opening a PR or patch-package
…On Wed, 7 Oct 2020, 16:46 Edouard, ***@***.***> wrote:
Any idea of a workaround while this bug is fix ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#676 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBG6AILFTBHDHJTOVDLSJSEPHANCNFSM4RXPSTLA>
.
|
Should be fixed in 7.12 |
🎉 This issue has been resolved in version 7.0.12 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Report
When using new Date as a field value in a draft, the resulting patch doesn't produce a valid date when replayed.
Link to repro
https://codesandbox.io/s/immer-sandbox-forked-wzvm6?file=/src/index.js
To Reproduce
Run the code above and look in the console.
Observed behavior
After patch is applied, date is null.
Expected behavior
After patch, date should be a valid primitive date
Environment
Node.JS 14.8.0
Immer 7.0.9
The text was updated successfully, but these errors were encountered: