mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Fix @-mention autocompletes when no @ typed
Introduced by my fix to #1418 a few commits back, sorry about that! (imported from commit 9df9cdaf4226012076ccdfe0c062606ca8026b38)
This commit is contained in:
parent
3af905db66
commit
a33e6a5ec0
@ -276,7 +276,7 @@ exports.initialize = function () {
|
||||
// Don't autocomplete more than this many characters.
|
||||
var max_chars = 30;
|
||||
var last_at = q.lastIndexOf('@');
|
||||
if (last_at < q.length-1 - max_chars)
|
||||
if (last_at === -1 || last_at < q.length-1 - max_chars)
|
||||
return false; // No '@', or too far back
|
||||
|
||||
current_token = q.substring(last_at + 1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user