diff options
author | friendica <info@friendica.com> | 2015-01-19 14:32:25 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-19 14:32:25 -0800 |
commit | 43d2703e92bc3dd15539e604dc1d0b073902f595 (patch) | |
tree | c0f0a0d3e4c52acb315d81d5f7da6966778d2d34 | |
parent | ec6e147935b90b4f37a17fb8c7d21cfb250b1546 (diff) | |
parent | abddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53 (diff) | |
download | volse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.tar.gz volse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.tar.bz2 volse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.zip |
Merge https://github.com/friendica/red into pending_merge
-rw-r--r-- | view/js/autocomplete.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index 3c35df860..50ba99279 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -13,9 +13,9 @@ 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}); - callback(matching); + setTimeout(function() { callback(matching)} , 1); // Use "pseudo-thread" to avoid some problems return; } } |