Skip to content

Commit

Permalink
feat: improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Sep 4, 2020
1 parent 558099f commit b52e982
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/pages/posts/navigation/search/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default {
data() {
return {
searchQuery: '',
searchQuery: null,
}
},
Expand Down Expand Up @@ -101,13 +101,14 @@ export default {
},
getTags: debounce(function () {
if (this.searchQuery.length > 2) {
this.fetchSearchTag(this.searchQuery)
} else {
if (this.searchQuery.length < 2) {
this.searchedTagsManager({
operation: 'reset',
})
return
}
this.fetchSearchTag(this.searchQuery)
}, 350),
resetAddedTags() {
Expand Down

0 comments on commit b52e982

Please sign in to comment.