diff options
| author | Henry Jameson <me@hjkos.com> | 2019-03-09 01:36:35 +0200 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2019-03-09 01:51:36 +0200 |
| commit | a02a74e9b9b999cd6c640c541dfbfcff3b2ebd9a (patch) | |
| tree | dbb638e855cbcb13fcbcf8b1d9fc62ca17b639cc /src/components/user_profile/user_profile.js | |
| parent | fe624f6114220320e1528981af83fb7ab39c0e67 (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.js | 11 |
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') |
