From 634872d8b1890e524922a6c0110413b0c13e4838 Mon Sep 17 00:00:00 2001 From: thomasrosen Date: Thu, 21 Jan 2021 22:41:14 +0100 Subject: [PATCH] BUGFIX do nothing when file is not existing --- src/App.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/App.js b/src/App.js index b8f555a..aa90b9e 100644 --- a/src/App.js +++ b/src/App.js @@ -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()