display no message on empty data fetched from api

This commit is contained in:
Brenden Bice 2019-04-12 23:12:22 -04:00
parent 2ae0507575
commit 41845389a9
1 changed files with 2 additions and 3 deletions

View File

@ -81,8 +81,7 @@ export const mutations = {
user.friends.push(friend)
}
})
user.lastFriendId = friends.length ? last(friends).id : last(user.friends).id
user.lastFriendId = last(user.friends).id
},
addFollowers (state, { id, followers }) {
const user = state.usersObject[id]
@ -91,7 +90,7 @@ export const mutations = {
user.followers.push(follower)
}
})
user.lastFollowerId = last(followers).id
user.lastFollowerId = last(user.followers).id
},
// Because frontend doesn't have a reason to keep these stuff in memory
// outside of viewing someones user profile.