レインせんぱいにサンキュー

This commit is contained in:
Henry Jameson 2019-03-12 22:10:22 +02:00
parent ce8b5fcd11
commit 27cbe3ca65
4 changed files with 8 additions and 32 deletions

View file

@ -100,9 +100,10 @@ const UserProfile = {
if (this.userId && !this.$route.params.name) {
fetchPromise = this.$store.dispatch('fetchUser', this.userId)
} else {
fetchPromise = this.$store.dispatch('fetchUserByScreenName', this.userName)
.then(userId => {
this.fetchedUserId = userId
fetchPromise = this.$store.dispatch('fetchUser', this.userName)
.then(({ id }) => {
console.log(arguments)
this.fetchedUserId = id
})
}
return fetchPromise