Skip to content

fix(db-mongodb): fallback version when not selected #12158

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Apr 18, 2025

When doing payload.db.queryDrafts with select without version, or simply your select looks like:
select: { version: { nonExistingField: true } } - the queryDrafts function will crash because it tries to access the version field.
This PR adds a fallback.

@r1tsuu r1tsuu merged commit 6dc61ae into main Apr 18, 2025
81 checks passed
@r1tsuu r1tsuu deleted the fix/version-is-not-selected branch April 18, 2025 18:43
Copy link
Contributor

🚀 This is included in version v3.36.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants