Only search when query has length

This commit is contained in:
2022-08-14 23:44:52 +02:00
parent 3a58e77da0
commit 5f942848aa
2 changed files with 4 additions and 3 deletions

View File

@@ -61,8 +61,9 @@
}
function fetchTorrents() {
loading.value = true;
if (!props.query?.length) return;
loading.value = true;
searchTorrents(props.query)
.then(torrentResponse => setTorrents(torrentResponse?.results))
.then(() => updateResultCountDisplay())