Fix: empty filename search

This commit is contained in:
2021-12-12 17:23:27 +08:00
parent 2c802ca807
commit 003f8cace2

View File

@@ -9,6 +9,10 @@ function SearchFiles(props) {
const limit = 10;
function searchFiles() {
// check empty filename
if (filename === "") {
return;
}
setIsLoading(true);
fetch("/api/v1/search_files", {
method: "POST",