Merge pull request #10074 from strapi/i18n/fix-media

I18n/fix media
This commit is contained in:
Alexandre BODIN 2021-04-19 19:11:27 +02:00 committed by GitHub
commit 321ceede80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -255,6 +255,7 @@ const reducer = (state = initialState, action) => {
allowedTypes: ['images', 'files', 'videos'],
type: 'media',
multiple: true,
...options,
};
} else if (attributeType === 'enumeration') {
dataToSet = { ...options, type: 'enumeration', enum: [] };

View File

@ -36,10 +36,9 @@ const extendCTBAttributeInitialDataMiddleware = () => {
if (
action.type === 'ContentTypeBuilder/FormModal/SET_ATTRIBUTE_DATA_SCHEMA' &&
action.forTarget === 'contentType' &&
!['relation', 'media', 'component'].includes(action.attributeType) &&
!['relation', 'component'].includes(action.attributeType) &&
!action.isEditing
) {
// We need to make sure the plugin is installed
return enhanceAction();
}