fix home not loading madeforyou if you have no friends
This commit is contained in:
parent
155ed94551
commit
f930f0fd16
1 changed files with 20 additions and 14 deletions
|
@ -44,7 +44,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row" v-if="friendsListeningTo && friendsListeningTo != []">
|
||||
<div class="col">
|
||||
<h3>Friends Listening To</h3>
|
||||
<div class="well">
|
||||
|
@ -109,6 +109,16 @@
|
|||
}
|
||||
).then((data) => {
|
||||
console.log(data.data[1])
|
||||
try{
|
||||
self.madeForYou = data.data.filter(section => {
|
||||
if (section.meta.metrics.moduleType == "6") {
|
||||
return section
|
||||
}
|
||||
;
|
||||
})[0].relationships.contents.data
|
||||
}
|
||||
catch(err){}
|
||||
try{
|
||||
self.recentlyPlayed = data.data[1].relationships.contents.data
|
||||
self.friendsListeningTo = data.data.filter(section => {
|
||||
if (section.meta.metrics.moduleType == "11") {
|
||||
|
@ -116,12 +126,8 @@
|
|||
}
|
||||
;
|
||||
})[0].relationships.contents.data
|
||||
self.madeForYou = data.data.filter(section => {
|
||||
if (section.meta.metrics.moduleType == "6") {
|
||||
return section
|
||||
}
|
||||
;
|
||||
})[0].relationships.contents.data
|
||||
}catch(err){}
|
||||
|
||||
});
|
||||
|
||||
app.mk.api.v3.music("/v1/me/social/profile/").then((response) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue