fix if not found
This commit is contained in:
parent
f76a2f2ecd
commit
6c45d14d21
5
main.js
5
main.js
@ -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, [])
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user