Skip to content

Commit

Permalink
fix results
Browse files Browse the repository at this point in the history
  • Loading branch information
NeloBlivion authored Feb 19, 2024
1 parent e2494bb commit a798527
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/media/SongSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default {
this.searchRegions(query, "ja_jp"),
this.searchRegions(query, "en_us"),
]);
const lookupEn = resEn.results || [];
const lookupEn = resEn || [];
console.log(lookupEn);
const fnLookupFn = (id, name, altName) => {
const foundEn = lookupEn.find((x) => x.trackId === id);
Expand All @@ -177,11 +177,11 @@ export default {
}
return altName || name;
};
if (res && res.results) {
console.log(res.results);
if (res) {
console.log(res);
this.fromApi = [
...md.slice(0, 3),
...res.results.map(
...res.map(
({
trackId,
collectionName,
Expand Down Expand Up @@ -222,7 +222,7 @@ export default {
},
async searchRegions(query, lang = "ja_jp", regions: Array<String> = ['JP', 'US']) {
// Order regions by highest to lowest priority; missing IDs will merge in.
let regionSongs = [];
const regionSongs = [];
let parsedIDs = [];
for (const r of regions) {
const queryed = await this.searchAutocomplete(query, lang, r);
Expand Down

0 comments on commit a798527

Please sign in to comment.