Browse Source

Update Timeline.vue, fix missing scope update

Daniel Supernault 6 năm trước cách đây
mục cha
commit
069aad301e

+ 2 - 2
resources/assets/js/components/Timeline.vue

@@ -398,7 +398,7 @@
 			infiniteTimeline($state) {
 			infiniteTimeline($state) {
 				let homeTimeline = '/api/v1/timelines/home';
 				let homeTimeline = '/api/v1/timelines/home';
 				let localTimeline = '/api/v1/timelines/public';
 				let localTimeline = '/api/v1/timelines/public';
-				let apiUrl = this.scope == '/' ? homeTimeline : localTimeline;
+				let apiUrl = this.scope == 'home' ? homeTimeline : localTimeline;
 				axios.get(apiUrl, {
 				axios.get(apiUrl, {
 					params: {
 					params: {
 						page: this.page,
 						page: this.page,
@@ -424,7 +424,7 @@
 			loadMore() {
 			loadMore() {
 				let homeTimeline = '/api/v1/timelines/home';
 				let homeTimeline = '/api/v1/timelines/home';
 				let localTimeline = '/api/v1/timelines/public';
 				let localTimeline = '/api/v1/timelines/public';
-				let apiUrl = this.scope == '/' ? homeTimeline : localTimeline;
+				let apiUrl = this.scope == 'home' ? homeTimeline : localTimeline;
 				axios.get(apiUrl, {
 				axios.get(apiUrl, {
 					params: {
 					params: {
 						page: this.page,
 						page: this.page,