diff options
Diffstat (limited to 'src/components/user_profile')
| -rw-r--r-- | src/components/user_profile/user_profile.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 48a8a073..26be1801 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -5,6 +5,9 @@ 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) + } }, destroyed () { this.$store.dispatch('stopFetching', 'user') @@ -18,7 +21,7 @@ const UserProfile = { if (this.timeline.statuses[0]) { return this.timeline.statuses[0].user } else { - return false + return this.$store.state.users.usersObject[this.userId] || false } } }, |
