Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Fix bug in search causing console errors (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankchhabra committed Oct 15, 2022
1 parent 039f745 commit 26c1481
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/store/modules/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ const actions = {
searchAppStore({ state, commit }, searchQuery) {
commit("setSearchQuery", searchQuery);

// don't try to search for no query, eg. when
// the user clears the search input
if (!searchQuery) {
return;
}

// don't search if the search index isn't built yet
if (!state.searchIndex) {
return commit("setSearchResults", []);
Expand Down
1 change: 0 additions & 1 deletion src/views/AppStore/AppStore.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
class="search-input"
type="text"
v-model="appStoreSearchQuery"
@input="search"
placeholder="Search apps"
></b-input>
</div>
Expand Down

0 comments on commit 26c1481

Please sign in to comment.