Skip to content

Commit

Permalink
fix(saved posts): normalize search queries
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Nov 20, 2021
1 parent 04a485e commit 2a703cf
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pages/premium/saved-posts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,13 @@ export default {
}
})
const SEARCH_RESULTS = AVAILABLE_TAGS.filter((TAG) => {
return TAG.name.includes(query)
// Normalize query
query = query.toLowerCase()
const SEARCH_RESULTS = AVAILABLE_TAGS.filter((tag) => {
const NORMALIZED_TAG = tag.name.toLowerCase()
return NORMALIZED_TAG.includes(query)
})
this.searchResults = SEARCH_RESULTS
Expand Down

0 comments on commit 2a703cf

Please sign in to comment.