fix if not found

This commit is contained in:
Zhora Shalyapin 2025-03-19 10:41:48 +00:00
parent f76a2f2ecd
commit 6c45d14d21

View File

@ -746,7 +746,7 @@
} }
function toggleRows(rows, from, to, cycle, showIndex) { function toggleRows(rows, from, to, cycle, showIndex) {
for (let i = from; i < to; i = i + cycle) { for (let i = from; i < to; i += cycle) {
for (let j = 0; j < cycle; j++) { for (let j = 0; j < cycle; j++) {
if (!showIndex.includes(j)) { if (!showIndex.includes(j)) {
rows[i + j]?.classList.toggle("collapsed") rows[i + j]?.classList.toggle("collapsed")
@ -1849,6 +1849,9 @@
function toggleStagePageRows(rows) { function toggleStagePageRows(rows) {
let showIndex = [0, 3] let showIndex = [0, 3]
let to = rows.findIndex(el => el.querySelector("th")?.textContent.trim() == "Бонусы") let to = rows.findIndex(el => el.querySelector("th")?.textContent.trim() == "Бонусы")
if (to == -1)
to = rows.length
toggleRows(rows, 3, to, 8, showIndex) toggleRows(rows, 3, to, 8, showIndex)
toggleRows(rows, to, rows.length, 1, []) toggleRows(rows, to, rows.length, 1, [])
} }