fix conditional in LoadSYSEXFile handleInput
This commit is contained in:
@@ -110,10 +110,8 @@ function LoadSYSEXFile(props) {
|
|||||||
|
|
||||||
// on submit button press, pass the file to the parent component
|
// on submit button press, pass the file to the parent component
|
||||||
const handleInput = (event) => {
|
const handleInput = (event) => {
|
||||||
if (!fileLoaded()) {
|
|
||||||
event.preventDefault();
|
|
||||||
} else {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
if (fileLoaded()) {
|
||||||
props.sendFileData(data);
|
props.sendFileData(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -137,8 +135,6 @@ function LoadSYSEXFile(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fileToObject() {}
|
|
||||||
|
|
||||||
function MIDIComponent() {
|
function MIDIComponent() {
|
||||||
const [loadedFile, loadFile] = useState(null);
|
const [loadedFile, loadFile] = useState(null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user