Skip to content

Undefined value #54

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

Closed
josinaldobarbosa opened this issue Feb 15, 2020 · 3 comments
Closed

Undefined value #54

josinaldobarbosa opened this issue Feb 15, 2020 · 3 comments

Comments

@josinaldobarbosa
Copy link

should that be undefined?

Original: [ { _id: 123, id_content: 111, id_category: 22 } ]
New: [ { id_content: 111, id_category: 22 } ]
detailedDiff/diff: { added: {}, deleted: { '0': { _id: undefined } }, updated: {} }

@papb
Copy link

papb commented Feb 15, 2020

Yes, this is the way this module works, it outputs the current value, since _id no longer exists, its current value resolves to undefined.

@anko
Copy link
Contributor

anko commented Feb 15, 2020

Yep, I think that's the expected behaviour. The readme deletedDiff example works the same way.

@josinaldobarbosa
Copy link
Author

ok, thanks guys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants