Skip to content

Commit

Permalink
style(userpicker): reverse guard clause
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwoodland authored and stavares843 committed Jun 9, 2022
1 parent 36f1d35 commit bcf3535
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/interactables/UserPicker/UserPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ export default Vue.extend({
friends: (state) => (state as RootState).friends.all,
}),
filteredFriends(): Friend[] {
if (this.filter) {
const filterLower = this.filter.toLowerCase()
return this.friends.filter((friend: Friend) => {
return friend.name.toLowerCase().includes(filterLower)
})
if (!this.filter) {
return this.friends
}
return this.friends
const filterLower = this.filter.toLowerCase()
return this.friends.filter((friend: Friend) => {
return friend.name.toLowerCase().includes(filterLower)
})
},
},
watch: {
Expand Down

0 comments on commit bcf3535

Please sign in to comment.