From cb255975eeb2aefe464d03b73df6f6f3ba1e1877 Mon Sep 17 00:00:00 2001 From: "[poww10s]" <[theironminer@gmail.com]> Date: Mon, 7 Sep 2020 18:39:16 -0400 Subject: [PATCH] fix conditional in LoadSYSEXFile handleInput --- src/components/MidiComponent.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/MidiComponent.js b/src/components/MidiComponent.js index 33fcbd3..1b507d6 100644 --- a/src/components/MidiComponent.js +++ b/src/components/MidiComponent.js @@ -110,10 +110,8 @@ function LoadSYSEXFile(props) { // on submit button press, pass the file to the parent component const handleInput = (event) => { - if (!fileLoaded()) { - event.preventDefault(); - } else { - event.preventDefault(); + event.preventDefault(); + if (fileLoaded()) { props.sendFileData(data); } }; @@ -137,8 +135,6 @@ function LoadSYSEXFile(props) { ); } -function fileToObject() {} - function MIDIComponent() { const [loadedFile, loadFile] = useState(null);