diff options
author | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-09-22 21:15:00 +0300 |
---|---|---|
committer | Mitchell Hentges <mitchhentges@protonmail.com> | 2016-10-11 04:26:22 +0300 |
commit | f19766a3c2223b05e1f6de1746a44e7173387988 (patch) | |
tree | 68e962dbd5a03119e2b9ae684cf4eedd1f16edee /app/assets/javascripts/users_select.js | |
parent | 6f441ae1a10a00007fcb361626f826321b511d90 (diff) |
Ensure that whitespace doesn't case adding members to fail
Diffstat (limited to 'app/assets/javascripts/users_select.js')
-rw-r--r-- | app/assets/javascripts/users_select.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/users_select.js b/app/assets/javascripts/users_select.js index bcabda3ceb2..d966277a8b2 100644 --- a/app/assets/javascripts/users_select.js +++ b/app/assets/javascripts/users_select.js @@ -261,10 +261,11 @@ } } if (showEmailUser && data.results.length === 0 && query.term.match(/^[^@]+@[^@]+$/)) { + var trimmed = query.term.trim(); emailUser = { name: "Invite \"" + query.term + "\"", - username: query.term, - id: query.term + username: trimmed, + id: trimmed }; data.results.unshift(emailUser); } |