Skip to content

Commit

Permalink
Settings: don't disable the image selection when there is media error
Browse files Browse the repository at this point in the history
  • Loading branch information
enricobattocchi committed May 7, 2024
1 parent 6ad25bf commit 23b32fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 23b32fa

Please sign in to comment.