diff options
| author | jasper <jasper92341@hotmail.com> | 2019-02-18 17:15:16 -0800 |
|---|---|---|
| committer | jasper <jasper92341@hotmail.com> | 2019-02-18 17:15:16 -0800 |
| commit | b4709515f22446b032c664e0960419ebea119098 (patch) | |
| tree | 259e669bcc6cf8a260815b3ac049613601b4a6e7 | |
| parent | d4a2376e12cd9a05e29bf8eb55d7388598ed1137 (diff) | |
Fix error when login
| -rw-r--r-- | src/components/timeline/timeline.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 40b42d50..3fc927f9 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -47,7 +47,22 @@ const Timeline = { UserCard }, created () { + const store = this.$store + const credentials = store.state.users.currentUser.credentials + const showImmediately = this.timeline.visibleStatuses.length === 0 + window.addEventListener('scroll', this.scrollLoad) + + if (typeof credentials !== 'undefined' || this.timelineName !== 'friends') { + timelineFetcher.fetchAndUpdate({ + store, + credentials, + timeline: this.timelineName, + showImmediately, + userId: this.userId, + tag: this.tag + }) + } }, mounted () { if (typeof document.hidden !== 'undefined') { |
