diff --git a/app/assets/javascripts/discourse/lib/user-search.js.es6 b/app/assets/javascripts/discourse/lib/user-search.js.es6 index 4270bc0051f..0b2c13dba8c 100644 --- a/app/assets/javascripts/discourse/lib/user-search.js.es6 +++ b/app/assets/javascripts/discourse/lib/user-search.js.es6 @@ -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 = {}; }