Skip to content

Commit

Permalink
fix: catch if paginated page has no results and return to page 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jakowenko committed Sep 19, 2021
1 parent 9932541 commit 713be92
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/src/views/Match.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,16 @@ export default {
if (!$this.liveReload) {
$this.matches.source = data.matches;
if ($this.pagination.page > 1 && !data.matches.length) {
$this.pagination.page = 1;
await $this.get().matches();
return;
}
}
$this.loading.files = false;
} catch (error) {
$this.loading.files = false;
$this.emitter.emit('error', error);
}
},
Expand Down

0 comments on commit 713be92

Please sign in to comment.