From 2d96f901815e64c75135736b3c0ead90e4416ebc Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Fri, 22 Jan 2016 16:18:23 +0000 Subject: [PATCH] Review comments --- src/Entities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entities.js b/src/Entities.js index a803d0c71a..5a666b1493 100644 --- a/src/Entities.js +++ b/src/Entities.js @@ -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) {