diff options
author | RedMatrix <info@friendica.com> | 2015-01-20 08:48:26 +1100 |
---|---|---|
committer | RedMatrix <info@friendica.com> | 2015-01-20 08:48:26 +1100 |
commit | abddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53 (patch) | |
tree | 860214eec1ea662ed27100436abbe095653fdb2d /view/js/autocomplete.js | |
parent | ab2db9e81907acd7416ee95f84e0af68ced2feea (diff) | |
parent | 9cd522a7907c5cff72ac76e02a2de02dd989c9be (diff) | |
download | volse-hubzilla-abddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53.tar.gz volse-hubzilla-abddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53.tar.bz2 volse-hubzilla-abddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53.zip |
Merge pull request #870 from pafcu/autocomplete_fix
Fix autocomplete with groups
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r-- | view/js/autocomplete.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index f695a5dbf..50ba99279 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -13,7 +13,7 @@ function contact_search(term, callback, backend_url, type, extra_channels) { for(t in contact_search.cache[bt]) { if(lterm.indexOf(t) >= 0) { // A more broad search has been performed already, so use those results // Filter old results locally - var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || x.nick.toLowerCase().indexOf(lterm) >= 0); }); + var matching = contact_search.cache[bt][t].filter(function (x) { return (x.name.toLowerCase().indexOf(lterm) >= 0 || (typeof x.nick !== 'undefined' && x.nick.toLowerCase().indexOf(lterm) >= 0)); }); // Need to check that nick exists because groups don't have one matching.unshift({taggable:false, text: term, replace: term}); setTimeout(function() { callback(matching)} , 1); // Use "pseudo-thread" to avoid some problems return; |