mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +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/";
|
const ONLINE_FIX_URL = "https://online-fix.me/";
|
||||||
|
|
||||||
|
let totalPages = 1;
|
||||||
|
|
||||||
export const getNewRepacksFromOnlineFix = async (
|
export const getNewRepacksFromOnlineFix = async (
|
||||||
existingRepacks: Repack[] = [],
|
existingRepacks: Repack[] = [],
|
||||||
page = 1,
|
page = 1,
|
||||||
|
@ -70,9 +72,12 @@ export const getNewRepacksFromOnlineFix = async (
|
||||||
|
|
||||||
const repacks: QueryDeepPartialEntity<Repack>[] = [];
|
const repacks: QueryDeepPartialEntity<Repack>[] = [];
|
||||||
const articles = Array.from(document.querySelectorAll(".news"));
|
const articles = Array.from(document.querySelectorAll(".news"));
|
||||||
const totalPages = Number(
|
|
||||||
document.querySelector("nav > a:nth-child(13)")?.textContent
|
if (page == 1) {
|
||||||
);
|
totalPages = Number(
|
||||||
|
document.querySelector("nav > a:nth-child(13)")?.textContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue