FIX: Error with debouncing mentions

This commit is contained in:
Robin Ward 2018-08-01 15:57:24 -04:00
parent 2ec1aec2be
commit 4eef41ea1b

View File

@ -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 = {};
}