fix: rich text link element not validating on create (#3014)

This commit is contained in:
Jarrod Flesch
2023-07-18 08:54:22 -04:00
committed by GitHub
parent 733fc0b2d0
commit 60fca40780
2 changed files with 22 additions and 3 deletions

View File

@@ -46,9 +46,7 @@ export const getBaseFields = (config: Config): Field[] => [
type: 'text',
required: true,
admin: {
condition: ({ linkType, url }) => {
return (typeof linkType === 'undefined' && url) || linkType === 'custom';
},
condition: ({ linkType }) => linkType !== 'internal',
},
},
{