mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 23:06:57 +08:00
FIX: Error with debouncing mentions
This commit is contained in:
parent
2ec1aec2be
commit
4eef41ea1b
|
@ -23,6 +23,9 @@ function performSearch(
|
|||
resultsFn(cached);
|
||||
return;
|
||||
}
|
||||
if (term === "") {
|
||||
return [];
|
||||
}
|
||||
|
||||
// need to be able to cancel this
|
||||
oldSearch = $.ajax(userPath("search/users"), {
|
||||
|
@ -122,10 +125,6 @@ export default function userSearch(options) {
|
|||
currentTerm = term;
|
||||
|
||||
return new Ember.RSVP.Promise(function(resolve) {
|
||||
if (term.length === 0) {
|
||||
resolve([]);
|
||||
return;
|
||||
}
|
||||
if (new Date() - cacheTime > 30000 || cacheTopicId !== topicId) {
|
||||
cache = {};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user