aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-03-09 01:36:35 +0200
committerHenry Jameson <me@hjkos.com>2019-03-09 01:51:36 +0200
commita02a74e9b9b999cd6c640c541dfbfcff3b2ebd9a (patch)
treedbb638e855cbcb13fcbcf8b1d9fc62ca17b639cc /src/components/user_profile/user_profile.js
parentfe624f6114220320e1528981af83fb7ab39c0e67 (diff)
attempt at fixing switching to user TL
Diffstat (limited to 'src/components/user_profile/user_profile.js')
-rw-r--r--src/components/user_profile/user_profile.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 0f387f66..dc9cdeeb 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -38,6 +38,9 @@ const UserProfile = {
created () {
if (!this.user.id) {
this.fetchUserId()
+ .then(() => this.startUp())
+ } else {
+ this.startUp()
}
},
destroyed () {
@@ -116,9 +119,11 @@ const UserProfile = {
.then(() => this.startUp())
},
startUp () {
- this.$store.dispatch('startFetching', { timeline: 'user', userId: this.userId })
- this.$store.dispatch('startFetching', { timeline: 'media', userId: this.userId })
- this.startFetchFavorites()
+ if (this.userId) {
+ this.$store.dispatch('startFetching', { timeline: 'user', userId: this.userId })
+ this.$store.dispatch('startFetching', { timeline: 'media', userId: this.userId })
+ this.startFetchFavorites()
+ }
},
cleanUp () {
this.$store.dispatch('stopFetching', 'user')