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

fix(queryContent): use path argument as prefix if there is another condition #1612

Merged
merged 2 commits into from Oct 18, 2022

Conversation

farnabaz
Copy link
Member

πŸ”— Linked issue

resolves #1565

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Currently if user passes the path argument to queryContent composable and call findOne, it will look for the exact match for that path.
This is acceptable behaviour, when user wants to find a single content without additional condition.

But when user provides another condition using where function, we should use the path as a prefix matcher, otherwise the result will be empty all the time.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Oct 18, 2022

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit 4dfd01b
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/634ec2762936fc000792d8bd
😎 Deploy Preview https://deploy-preview-1612--nuxt-content.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@farnabaz farnabaz requested a review from Atinux October 18, 2022 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants