mirror of
https://github.com/xvvvyz/tilde.git
synced 2026-03-11 14:44:24 +00:00
that was a bad idea
This commit is contained in:
parent
332303203d
commit
50d271d691
1 changed files with 9 additions and 13 deletions
22
index.html
22
index.html
|
|
@ -666,20 +666,16 @@
|
|||
suggest(input) {
|
||||
input = input.trim();
|
||||
if (input === '') this._clearSuggestions();
|
||||
let suggestions = [];
|
||||
|
||||
for (const influencer of this._getInfluencerPromises(input)) {
|
||||
influencer.then(res => {
|
||||
suggestions = this._flattenAndUnique([...suggestions, ...res]);
|
||||
this._clearSuggestions();
|
||||
|
||||
if (suggestions.length) {
|
||||
this._appendSuggestions(suggestions, input);
|
||||
this._registerSuggestionEvents();
|
||||
$.bodyClassAdd('suggestions');
|
||||
}
|
||||
});
|
||||
}
|
||||
Promise.all(this._getInfluencerPromises(input)).then(res => {
|
||||
const suggestions = this._flattenAndUnique(res);
|
||||
this._clearSuggestions();
|
||||
if (suggestions.length) {
|
||||
this._appendSuggestions(suggestions, input);
|
||||
this._registerSuggestionEvents();
|
||||
$.bodyClassAdd('suggestions');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_appendSuggestions(suggestions, input) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue