that was a bad idea

This commit is contained in:
Cade Scroggins
2018-06-30 21:42:59 -07:00
parent 332303203d
commit 50d271d691
+9 -13
View File
@@ -666,20 +666,16 @@
suggest(input) { suggest(input) {
input = input.trim(); input = input.trim();
if (input === '') this._clearSuggestions(); if (input === '') this._clearSuggestions();
let suggestions = [];
for (const influencer of this._getInfluencerPromises(input)) { Promise.all(this._getInfluencerPromises(input)).then(res => {
influencer.then(res => { const suggestions = this._flattenAndUnique(res);
suggestions = this._flattenAndUnique([...suggestions, ...res]); this._clearSuggestions();
this._clearSuggestions(); if (suggestions.length) {
this._appendSuggestions(suggestions, input);
if (suggestions.length) { this._registerSuggestionEvents();
this._appendSuggestions(suggestions, input); $.bodyClassAdd('suggestions');
this._registerSuggestionEvents(); }
$.bodyClassAdd('suggestions'); });
}
});
}
} }
_appendSuggestions(suggestions, input) { _appendSuggestions(suggestions, input) {