Skip to content

Commit

Permalink
move await
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored Feb 19, 2024
1 parent f231c52 commit 91d0561
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/media/SongSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ export default {
let regionSongs = [];
let parsedIDs = [];
regions.forEach(r => {
regionSongs.concat((await this.searchAutocomplete(query, lang=lang, country=r)).reduce(acc, cur) => {
let currentSongs = await this.searchAutocomplete(query, lang=lang, country=r);
regionSongs.concat(currentSongs.reduce(acc, cur) => {
if (!parsedIDs.includes(cur.trackId)) {
parsedIDs.append(cur.trackId)
acc.append(cur)
Expand Down

0 comments on commit 91d0561

Please sign in to comment.