Update Profile.vue component, fix pagination bug

This commit is contained in:
Daniel Supernault 2020-04-26 02:47:47 -06:00
parent ed09e54158
commit 46767810a4
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 6 additions and 1 deletions

View File

@ -760,8 +760,13 @@
self.ids.push(d.id); 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.min_id = Math.max(...this.ids);
this.max_id = Math.min(...this.ids); this.max_id = max;
$state.loaded(); $state.loaded();
this.loading = false; this.loading = false;
} else { } else {