Skip to content

Commit

Permalink
don't make api calls with empty inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
chukarave committed Feb 26, 2024
1 parent ab26aa8 commit 7be97ca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion resources/js/Components/LanguageSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ const shownLanguages = computed<Language[]>(() => {
function onInput(searchedLanguage: string): void {
searchInput.value = searchedLanguage;
debouncedApiLanguageSearch(searchInput.value);
if (searchInput.value) {
debouncedApiLanguageSearch(searchInput.value);
}
highlightedIndex.value = 0;
}
Expand Down

0 comments on commit 7be97ca

Please sign in to comment.