Closed tyteen4a03 closed 2 months ago
Fixed in https://github.com/payloadcms/payload/pull/8122
We'll throw a clear error if the useAsTitle is invalid
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
No response
Environment Info
Describe the Bug
Specifying a
useAsTitle
on a field that doesn't exist triggers an undecipherable error:TypeError: right-hand side of 'in' should be an object, got undefined
when visiting the List page of the Collection.Reproduction Steps
export const Example: CollectionConfig = { slug: "example", admin: { useAsTitle: "email", // this field does not exist }, fields: [], };
export default Example;