mirror of
https://github.com/voltbonn/profile-picture-generator.git
synced 2024-12-22 15:55:08 +00:00
BUGFIX do nothing when file is not existing
This commit is contained in:
parent
0da8ecd11b
commit
634872d8b1
1 changed files with 4 additions and 0 deletions
|
@ -21,6 +21,10 @@ function App() {
|
|||
|
||||
|
||||
const handleReadFile = useCallback(file => {
|
||||
if (!(!!file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const reader = new FileReader()
|
||||
reader.onload = reader_event => {
|
||||
const img = new Image()
|
||||
|
|
Loading…
Reference in a new issue