Skip to content

Commit 4dcb0da

Browse files
committed
Handle attachment number rows with six child elements
1 parent 7d87622 commit 4dcb0da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pacer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -731,11 +731,11 @@ let PACER = {
731731
return 0;
732732
}
733733

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

738-
let rowNumber = row.childElementCount == 5 ? row.childNodes[1].innerHTML : row.childNodes[0].innerHTML;
738+
let rowNumber = [5,6].includes(row.childElementCount) ? row.childNodes[1].innerHTML : row.childNodes[0].innerHTML;
739739
let cleanNumber = this.cleanDocLinkNumber(rowNumber);
740740
return cleanNumber ? cleanNumber : 0;
741741
},

0 commit comments

Comments
 (0)