Skip to content

Commit

Permalink
fix(zoro): fixed hasNextPage always being true
Browse files Browse the repository at this point in the history
  • Loading branch information
bitknox committed Mar 8, 2024
1 parent 4b341ef commit 50acbf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/anime/zoro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Zoro extends AnimeParser {
override fetchEpisodeSources = async (
episodeId: string,
server: StreamingServers = StreamingServers.VidCloud
): Promise<ISource> => {
): Promise<ISource> => {
if (episodeId.startsWith('http')) {
const serverUrl = new URL(episodeId);
switch (server) {
Expand Down Expand Up @@ -301,7 +301,7 @@ class Zoro extends AnimeParser {
const pagination = $('ul.pagination');
res.currentPage = parseInt(pagination.find('.page-item.active')?.text());
const nextPage = pagination.find('a[title=Next]')?.attr('href');
if (nextPage != undefined || nextPage != '') {
if (nextPage != undefined && nextPage != '') {
res.hasNextPage = true;
}
const totalPages = pagination.find('a[title=Last]').attr('href')?.split('=').pop();
Expand Down

0 comments on commit 50acbf7

Please sign in to comment.