diff --git a/src/scripts/latest-fetch.ts b/src/scripts/latest-fetch.ts index 3cb03d2..1135259 100644 --- a/src/scripts/latest-fetch.ts +++ b/src/scripts/latest-fetch.ts @@ -6,7 +6,6 @@ import SearchQuery from "./classes/search-query.js"; import { urls as f95url } from "./constants/url.js"; /** - * @public * Gets the URLs of the latest updated games that match the passed parameters. * You *must* be logged. * @param {SearchQuery} query @@ -31,17 +30,20 @@ export async function fetchLatest(query: SearchQuery, limit = 30): Promise response.data.msg.pagination.total) noMorePages = true; + + //@ts-ignore + if (page > response.data.msg.pagination.total) noMorePages = true; } while (fetchedResults < limit && !noMorePages);