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

Simple find() receives error #3

Closed
moskalyk opened this issue Dec 14, 2021 · 2 comments
Closed

Simple find() receives error #3

moskalyk opened this issue Dec 14, 2021 · 2 comments

Comments

@moskalyk
Copy link

Simple code gives following error:

code:

	const doc = await db.collection('example').insert({cid: cid})

	const docs = await db.collection('example').find({cid: cid})

error:

(node:12899) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'equals' of undefined
    at compareEq (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:595:30)
    at queryCompare (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:547:17)
    at matchesQuery (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:533:10)
    at processDoc (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:434:15)
    at Cursor.[Symbol.asyncIterator] (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:503:48)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Cursor.then (/Users/mgrok/Projects/unicode/reed/threads-server/node_modules/hyperbeedeebee/index.js:383:24)
(Use `node --trace-warnings ...` to show where the warning was created)
@RangerMauve
Copy link
Owner

Would you be able to make a small repo that reproduces this issue?

@moskalyk
Copy link
Author

It seems when I change the db name from 'example' to something else, this resolves the error.

Here is the repo, will close now thank you for taking a look.

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

2 participants