🎣 Infinite scroll: no API request on last page
no issue Brings back a little safety guard: when the current page is also the last page, don't make an API request to the server.
This commit is contained in:
parent
0f9410fb3d
commit
8690450eae
1 changed files with 5 additions and 0 deletions
|
@ -46,6 +46,11 @@ $(function ($) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return if currentPage is the last page already
|
||||||
|
if (currentPage === maxPages) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
|
||||||
// next page
|
// next page
|
||||||
|
|
Loading…
Reference in a new issue