no need to create empty array

v1.18.x
barisusakli 11 years ago
parent fa98da6978
commit c7c3bc1c8e

@ -17,10 +17,8 @@ module.exports = function(User) {
query = query.toLowerCase();
var usernames = Object.keys(usernamesHash),
uids = [];
uids = usernames.filter(function(username) {
var usernames = Object.keys(usernamesHash);
var uids = usernames.filter(function(username) {
return username.toLowerCase().indexOf(query) === 0;
})
.slice(0, 10)

Loading…
Cancel
Save