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

Getting defaultKeywords is not defined #31

Closed
TimLavelle opened this issue Jul 7, 2023 · 1 comment
Closed

Getting defaultKeywords is not defined #31

TimLavelle opened this issue Jul 7, 2023 · 1 comment

Comments

@TimLavelle
Copy link

I've upgraded my app to NextJS 13.4.7 and still using q2m v 0.10.2 and in my API routes, I am now getting errors stating
error ReferenceError: defaultKeywords is not defined and it references /query-to-mongo/index.js:204

This is my code:

var query = q2m(request.url)
let dist = await db
    .collection(table)
    .find(query.criteria, query.options)
    .sort({ name: 1 })
    .toArray();

Not sure if you've tested with Next 13, but just wanted to report it just in case.

@pbatey
Copy link
Owner

pbatey commented Sep 4, 2023

Thanks for pointing this out - I added some eslint to catch this type of issue in the future. It should be fixed in v0.11.2.

@pbatey pbatey closed this as completed Sep 4, 2023
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