From 23b32fa0a395d2ebce6fbbd40348e8e5b1149265 Mon Sep 17 00:00:00 2001 From: Enrico Battocchi Date: Fri, 3 May 2024 13:31:17 +0200 Subject: [PATCH] Settings: don't disable the image selection when there is media error --- .../js/src/settings/components/formik-media-select-field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/js/src/settings/components/formik-media-select-field.js b/packages/js/src/settings/components/formik-media-select-field.js index 20dc3e41091..b021f696002 100644 --- a/packages/js/src/settings/components/formik-media-select-field.js +++ b/packages/js/src/settings/components/formik-media-select-field.js @@ -63,7 +63,7 @@ const FormikMediaSelectField = ( { const fallbackMedia = useSelectSettings( "selectMediaById", [ fallbackMediaId ], fallbackMediaId ); const { fetchMedia, addOneMedia } = useDispatchSettings(); const error = useMemo( () => get( errors, mediaIdName, "" ), [ errors, mediaIdName ] ); - const disabled = useMemo( () => isDisabled || isDummy || isMediaError, [ isDummy, isDisabled, isMediaError ] ); + const disabled = useMemo( () => isDisabled || isDummy, [ isDummy, isDisabled ] ); const { ids: describedByIds, describedBy } = useDescribedBy( `field-${ id }-id`, { description, error } ); const previewMedia = useMemo( () => { if ( mediaId > 0 ) {