aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_profile/user_profile.js')
-rw-r--r--src/components/user_profile/user_profile.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 24a8cce9..8a32392a 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -4,9 +4,9 @@ import Timeline from '../timeline/timeline.vue'
const UserProfile = {
created () {
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userId])
- if (!this.$store.state.users.usersObject[this.userId]) {
- this.$store.dispatch('fetchUser', this.userId)
+ this.$store.dispatch('startFetching', ['user', this.userName])
+ if (!this.user) {
+ this.$store.dispatch('fetchUser', this.userName)
}
},
destroyed () {
@@ -34,7 +34,7 @@ const UserProfile = {
userName () {
this.$store.dispatch('stopFetching', 'user')
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userId])
+ this.$store.dispatch('startFetching', ['user', this.userName])
}
},
components: {