Skip to content
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

jsondiffpatch.diff gives undefined when comparing 2 different mongo ObjectIds #351

Open
rohanricky opened this issue Dec 6, 2023 · 0 comments

Comments

@rohanricky
Copy link

Script to reproduce:

const mongoose = require('mongoose');
const jsondiffpatch = require('jsondiffpatch')

const id1 = new mongoose.Types.ObjectId()
const id2 = new mongoose.Types.ObjectId()

console.log(`jsondiffpatch ${id1} ${id2}`,jsondiffpatch.diff(id1, id2))

Output:
jsondiffpatch 65703f8fe4e276a1a653d00a 65703f8fe4e276a1a653d00b undefined

Expected: difference should be present

mongoose version: 6.12.3
jsondiffpatch version: 0.5.0

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

1 participant