mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 08:31:23 -05:00
catch errors
This commit is contained in:
parent
5ba6bb83b9
commit
d9169e1892
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ const StudioImage = ({
|
|||
accept="image/*"
|
||||
onChange={e => {
|
||||
handleUpdate(e.target)
|
||||
.catch(() => { /* errors are handled in the reducer */ })
|
||||
.then(dataUrl => setUploadPreview(dataUrl));
|
||||
e.target.value = '';
|
||||
setHideValidationMessage(false);
|
||||
|
|
Loading…
Reference in a new issue