File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/Shared/Components/EditImageFormField Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,13 @@ const EditImageFormField = ({
63
63
}
64
64
65
65
const handleReset = ( newURL ?: string ) => {
66
- handleLastPreviewedURLChange ( newURL ?? lastPreviewedURL )
67
- handleURLChange ( newURL ?? lastPreviewedURL )
66
+ const targetURL = newURL ?? lastPreviewedURL
67
+ handleLastPreviewedURLChange ( targetURL )
68
+ handleURLChange ( targetURL )
68
69
handleError ( '' )
69
70
setIsEditing ( false )
70
71
setIsLoading ( false )
72
+ setEmptyPreviewURLErrorMessage ( '' )
71
73
}
72
74
73
75
const handleSuccess = ( ) => {
@@ -111,7 +113,7 @@ const EditImageFormField = ({
111
113
112
114
const blob = await response . blob ( )
113
115
if ( blob . size > DEFAULT_MAX_IMAGE_SIZE ) {
114
- throw new Error ( `Please add an image smaller than ${ DEFAULT_MAX_IMAGE_SIZE } bytes ` )
116
+ throw new Error ( `Please add an image smaller than ${ DEFAULT_MAX_IMAGE_SIZE / ( 1024 * 1024 ) } MB ` )
115
117
}
116
118
117
119
const src = URL . createObjectURL ( blob )
You can’t perform that action at this time.
0 commit comments