Skip to content

Commit

Permalink
Handle attachment number rows with six child elements
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys0dev committed Nov 16, 2024
1 parent 7d87622 commit 4dcb0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,11 @@ let PACER = {
return 0;
}

// If the attachment page uses checkboxes, each row should have five child nodes and the attachment
// If the attachment page uses checkboxes, each row should have five or six child nodes and the attachment
// number should be inside the second one(the first node has the checkbox). Attachment pages that does
// not have checkboxes shows the attachment number inside the first child node.

let rowNumber = row.childElementCount == 5 ? row.childNodes[1].innerHTML : row.childNodes[0].innerHTML;
let rowNumber = [5,6].includes(row.childElementCount) ? row.childNodes[1].innerHTML : row.childNodes[0].innerHTML;
let cleanNumber = this.cleanDocLinkNumber(rowNumber);
return cleanNumber ? cleanNumber : 0;
},
Expand Down

0 comments on commit 4dcb0da

Please sign in to comment.