-
Notifications
You must be signed in to change notification settings - Fork 39
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
applyPatch not using deep copy #44
Comments
chbrown
added a commit
that referenced
this issue
Apr 11, 2019
Good point. Fixed as of v3.0.2. FWIW, your example was kinda confusing. The jsfiddle was unnecessary, and only distracted from your technically valid (and useful!) bug report. You could have just written something like: const value = {}
const numbers = []
applyPatch(value, [
{op: 'add', path: '/numbers', value: numbers},
{op: 'add', path: '/numbers/-', value: 9},
])
assert.ok(numbers.length == 0) ...which is pretty much how I wrote the unit test for the bugfix. |
Wow! Thanks for the fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've looked around, and found #38 to be the most similar. However, I am facing a problem in the save category although that version is live probably.
Bug of feature?
This is a bug, I believe.
Use case / Example
https://jsfiddle.net/Ismaeel/1ewxshdq/
versions[0]
takes something fromversions[1]
Expected vs. Current output
I would expect my patch not to be modified at all, but that is not the case for now.
The text was updated successfully, but these errors were encountered: