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
I was trying to update an array and save the document, but it was not saving.
The culprit is within the isDeepEqual function: https://github.com/pubkey/rxdb/blob/master/src/RxDocument.js#L324
The isDeepEqual function only works if the arrays are the same length, or the original array is longer then the new array. A simple way to fix this would be to add a check for the array lengths before comparing the items in the array.
@codingmatty fixed with this commit
I changed the getters so we can use the npm-module deep-equal instead of the custom comparison. This makes sure we have a well-tested deepEqual-function.
Case
This is a Bug.
Issue
I was trying to update an array and save the document, but it was not saving.
The culprit is within the
isDeepEqual
function: https://github.com/pubkey/rxdb/blob/master/src/RxDocument.js#L324The
isDeepEqual
function only works if the arrays are the same length, or the original array is longer then the new array. A simple way to fix this would be to add a check for the array lengths before comparing the items in the array.Info
Code
This repl.it will demonstrate the root of the problem: https://repl.it/GRHE/0
Here is a snippet of what I was trying to do
The text was updated successfully, but these errors were encountered: