payload
payload copied to clipboard
Returning object from field condition causes it to be run infinitely
Describe the Bug
{
type: 'text',
name: 'textField',
admin: {
condition: (props) => {
return {
someObject: true
}
},
},
},
Having a field like this causes the condition function to endlessly run over and over again.
Yes, you are supposed to return a boolean, but I still find it weird that returning an object is causing this to happen.
This issue was found in #4410
Payload Version
2.5.0
@patricsgamma I've created a new issue for #4410 if you're interested in following it