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: invalid payload.collections type #9414

Merged
merged 1 commit into from
Nov 21, 2024
Merged

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Nov 21, 2024

What?

payload.collections was improperly typed.
This doesn't seem to work: (the type is {})

collections: {
  [slug: CollectionSlug]: Collection
} = {}
image

However, this does:

collections: Record<CollectionSlug, Collection> = {}
image

Additionally, the same fix applied to Permissions, PolymorphicUploadField['admin']['sortOptions'], PolymorphicRelationshipField['admin']['sortOptions']

@r1tsuu r1tsuu merged commit 91dcf6d into main Nov 21, 2024
57 checks passed
@r1tsuu r1tsuu deleted the fix/type-payload.collections branch November 21, 2024 20:58
Copy link
Contributor

🚀 This is included in version v3.1.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.

1 participant