Browse Source

Don't show “load more” if there is nothing more (followers)

marcin mikołajczak 6 years ago
parent
commit
50e7d61f6e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      resources/assets/js/components/Profile.vue

+ 5 - 3
resources/assets/js/components/Profile.vue

@@ -702,7 +702,8 @@ export default {
 				if(res.data.length > 0) {
 					this.following.push(...res.data);
 					this.followingCursor++;
-				} else {
+				}
+                if(res.data.length < 10) {
 					this.followingMore = false;
 				}
 			});
@@ -719,11 +720,12 @@ export default {
 				if(res.data.length > 0) {
 					this.followers.push(...res.data);
 					this.followerCursor++;
-				} else {
+				}
+                if(res.data.length < 10) {
 					this.followerMore = false;
 				}
 			});
 		}
 	}
 }
-</script>
+</script>