aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/autocomplete.js
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-01-19 14:32:25 -0800
committerfriendica <info@friendica.com>2015-01-19 14:32:25 -0800
commit43d2703e92bc3dd15539e604dc1d0b073902f595 (patch)
treec0f0a0d3e4c52acb315d81d5f7da6966778d2d34 /view/js/autocomplete.js
parentec6e147935b90b4f37a17fb8c7d21cfb250b1546 (diff)
parentabddaccb5f7e3f8fddc7d0cecd1c0eae28fd1e53 (diff)
downloadvolse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.tar.gz
volse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.tar.bz2
volse-hubzilla-43d2703e92bc3dd15539e604dc1d0b073902f595.zip
Merge https://github.com/friendica/red into pending_merge
Diffstat (limited to 'view/js/autocomplete.js')
-rw-r--r--view/js/autocomplete.js4
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;
}
}