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

findSurround ignore where #2300

Closed
jaribu opened this issue Sep 12, 2023 · 6 comments
Closed

findSurround ignore where #2300

jaribu opened this issue Sep 12, 2023 · 6 comments

Comments

@jaribu
Copy link

jaribu commented Sep 12, 2023

Environment


  • Operating System: Windows_NT
  • Node Version: v18.16.1
  • Nuxt Version: 3.7.1
  • CLI Version: 3.8.3
  • Nitro Version: 2.6.3
  • Package Manager: npm@9.5.1
  • Builder: -
  • User Config: modules, content, css, postcss, image, runtimeConfig, typescript, nitro, devtools, build, vue
  • Runtime Modules: @nuxt/content@2.8.2, @nuxt/image@1.0.0-rc.1
  • Build Modules: -

Reproduction

<script setup> const { path } = useRoute(); const [prev, next] = await queryContent() .only(["_path", "title"]) .sort({ date: 1 }) .where({ title: { $eq: "notexist" } }) .findSurround(path); </script>

Describe the bug

Should return null, same result with other where conditions.

Additional context

No response

Logs

No response

@vernaillen
Copy link

I noticed this issue as well and made a reproduction: https://stackblitz.com/~/github.com/vernaillen/nuxt-content-findSurround.

@vernaillen
Copy link

It seems there's already a fix on its way for the next release: #2291

@nobkd
Copy link
Contributor

nobkd commented Sep 13, 2023

Have you checked, if it is really fixed with the edge channel?

@vernaillen
Copy link

I just checked it now, in both my own project as the reproduction. It is indeed fixed.

@jaribu
Copy link
Author

jaribu commented Sep 14, 2023

Yes, I confirm it works with the edge channel

@farnabaz
Copy link
Member

Fixed in v2.8.3

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

4 participants