瀏覽代碼

Update Profile.vue component, fix pagination bug

Daniel Supernault 5 年之前
父節點
當前提交
46767810a4
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      resources/assets/js/components/Profile.vue

+ 6 - 1
resources/assets/js/components/Profile.vue

@@ -760,8 +760,13 @@
 								self.ids.push(d.id);
 							} 
 						});
+						let max = Math.min(...this.ids);
+						if(max == this.max_id) {
+							$state.complete();
+							return;
+						}
 						this.min_id = Math.max(...this.ids);
-						this.max_id = Math.min(...this.ids);
+						this.max_id = max;
 						$state.loaded();
 						this.loading = false;
 					} else {