Merge pull request #3536 from thelounge/xpaw/no-compute-filtered

Do not compute filteredUsers if there's no search input
This commit is contained in:
Pavel Djundik 2019-11-28 12:19:31 +02:00 committed by GitHub
commit 45f2576e96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,6 +81,10 @@ export default {
// filteredUsers is computed, to avoid unnecessary filtering
// as it is shared between filtering and keybindings.
filteredUsers() {
if (!this.userSearchInput) {
return;
}
return fuzzyFilter(this.userSearchInput, this.channel.users, {
pre: "<b>",
post: "</b>",