1
0
Fork 0
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:
thomasrosen 2021-01-21 22:41:14 +01:00
parent 0da8ecd11b
commit 634872d8b1

View file

@ -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()