that was a bad idea
This commit is contained in:
+9
-13
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user