mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-13 03:32:13 +00:00
fix: online fix totalPages becoming NaN
This commit is contained in:
parent
d3d9315102
commit
4b0f998830
1 changed files with 8 additions and 3 deletions
|
@ -14,6 +14,8 @@ import { formatBytes } from "@shared";
|
|||
|
||||
const ONLINE_FIX_URL = "https://online-fix.me/";
|
||||
|
||||
let totalPages = 1;
|
||||
|
||||
export const getNewRepacksFromOnlineFix = async (
|
||||
existingRepacks: Repack[] = [],
|
||||
page = 1,
|
||||
|
@ -70,9 +72,12 @@ export const getNewRepacksFromOnlineFix = async (
|
|||
|
||||
const repacks: QueryDeepPartialEntity<Repack>[] = [];
|
||||
const articles = Array.from(document.querySelectorAll(".news"));
|
||||
const totalPages = Number(
|
||||
|
||||
if (page == 1) {
|
||||
totalPages = Number(
|
||||
document.querySelector("nav > a:nth-child(13)")?.textContent
|
||||
);
|
||||
}
|
||||
|
||||
try {
|
||||
await Promise.all(
|
||||
|
|
Loading…
Reference in a new issue