From 1e43a47c3c922c4b68e0a84b74cafe6a2ea23bf1 Mon Sep 17 00:00:00 2001 From: jasper Date: Tue, 19 Feb 2019 09:42:53 -0800 Subject: [PATCH] Update: Fix fetch error when login --- src/components/timeline/timeline.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 3fc927f9..ee4ec10b 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -53,16 +53,16 @@ const Timeline = { 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 - }) - } + if (this.timelineName === 'friends' && !credentials) { return false } + + timelineFetcher.fetchAndUpdate({ + store, + credentials, + timeline: this.timelineName, + showImmediately, + userId: this.userId, + tag: this.tag + }) }, mounted () { if (typeof document.hidden !== 'undefined') {