Review comments

pull/21833/head
Kegan Dougal 2016-01-22 16:18:23 +00:00
parent ec54c7cf6c
commit 2d96f90181
1 changed files with 2 additions and 2 deletions

View File

@ -28,11 +28,11 @@ function isMatch(query, name, uid) {
}
// strip @ on uid and try matching again
if (uid.length > 1 && uid.substring(1).indexOf(query) === 0) {
if (uid.length > 1 && uid[0] === "@" && uid.substring(1).indexOf(query) === 0) {
return true;
}
// split spaces in name and try matching constituient parts
// split spaces in name and try matching constituent parts
var parts = name.split(" ");
for (var i = 0; i < parts.length; i++) {
if (parts[i].indexOf(query) === 0) {